@@ -2944,6 +2944,69 @@ def self.node_types_available? version: :v1
29442944 false
29452945 end
29462946
2947+ ##
2948+ # Create a new client object for OrganizationSecurityPolicies.
2949+ #
2950+ # By default, this returns an instance of
2951+ # [Google::Cloud::Compute::V1::OrganizationSecurityPolicies::Rest::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-compute-v1/latest/Google-Cloud-Compute-V1-OrganizationSecurityPolicies-Rest-Client)
2952+ # for a REST client for version V1 of the API.
2953+ # However, you can specify a different API version by passing it in the
2954+ # `version` parameter. If the OrganizationSecurityPolicies service is
2955+ # supported by that API version, and the corresponding gem is available, the
2956+ # appropriate versioned client will be returned.
2957+ #
2958+ # Raises an exception if the currently installed versioned client gem for the
2959+ # given API version does not support the OrganizationSecurityPolicies service.
2960+ # You can determine whether the method will succeed by calling
2961+ # {Google::Cloud::Compute.organization_security_policies_available?}.
2962+ #
2963+ # ## About OrganizationSecurityPolicies
2964+ #
2965+ # The OrganizationSecurityPolicies API.
2966+ #
2967+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
2968+ # Defaults to `:v1`.
2969+ # @return [::Object] A client object for the specified version.
2970+ #
2971+ def self . organization_security_policies version : :v1 , &block
2972+ require "google/cloud/compute/#{ version . to_s . downcase } "
2973+
2974+ package_name = Google ::Cloud ::Compute
2975+ . constants
2976+ . select { |sym | sym . to_s . downcase == version . to_s . downcase . tr ( "_" , "" ) }
2977+ . first
2978+ service_module = Google ::Cloud ::Compute . const_get ( package_name ) . const_get ( :OrganizationSecurityPolicies )
2979+ service_module . const_get ( :Rest ) . const_get ( :Client ) . new ( &block )
2980+ end
2981+
2982+ ##
2983+ # Determines whether the OrganizationSecurityPolicies service is supported by the current client.
2984+ # If true, you can retrieve a client object by calling {Google::Cloud::Compute.organization_security_policies}.
2985+ # If false, that method will raise an exception. This could happen if the given
2986+ # API version does not exist or does not support the OrganizationSecurityPolicies service,
2987+ # or if the versioned client gem needs an update to support the OrganizationSecurityPolicies service.
2988+ #
2989+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
2990+ # Defaults to `:v1`.
2991+ # @return [boolean] Whether the service is available.
2992+ #
2993+ def self . organization_security_policies_available? version : :v1
2994+ require "google/cloud/compute/#{ version . to_s . downcase } "
2995+ package_name = Google ::Cloud ::Compute
2996+ . constants
2997+ . select { |sym | sym . to_s . downcase == version . to_s . downcase . tr ( "_" , "" ) }
2998+ . first
2999+ return false unless package_name
3000+ service_module = Google ::Cloud ::Compute . const_get package_name
3001+ return false unless service_module . const_defined? :OrganizationSecurityPolicies
3002+ service_module = service_module . const_get :OrganizationSecurityPolicies
3003+ return false unless service_module . const_defined? :Rest
3004+ service_module = service_module . const_get :Rest
3005+ service_module . const_defined? :Client
3006+ rescue ::LoadError
3007+ false
3008+ end
3009+
29473010 ##
29483011 # Create a new client object for PacketMirrorings.
29493012 #
@@ -3007,6 +3070,69 @@ def self.packet_mirrorings_available? version: :v1
30073070 false
30083071 end
30093072
3073+ ##
3074+ # Create a new client object for PreviewFeatures.
3075+ #
3076+ # By default, this returns an instance of
3077+ # [Google::Cloud::Compute::V1::PreviewFeatures::Rest::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-compute-v1/latest/Google-Cloud-Compute-V1-PreviewFeatures-Rest-Client)
3078+ # for a REST client for version V1 of the API.
3079+ # However, you can specify a different API version by passing it in the
3080+ # `version` parameter. If the PreviewFeatures service is
3081+ # supported by that API version, and the corresponding gem is available, the
3082+ # appropriate versioned client will be returned.
3083+ #
3084+ # Raises an exception if the currently installed versioned client gem for the
3085+ # given API version does not support the PreviewFeatures service.
3086+ # You can determine whether the method will succeed by calling
3087+ # {Google::Cloud::Compute.preview_features_available?}.
3088+ #
3089+ # ## About PreviewFeatures
3090+ #
3091+ # The PreviewFeatures API.
3092+ #
3093+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
3094+ # Defaults to `:v1`.
3095+ # @return [::Object] A client object for the specified version.
3096+ #
3097+ def self . preview_features version : :v1 , &block
3098+ require "google/cloud/compute/#{ version . to_s . downcase } "
3099+
3100+ package_name = Google ::Cloud ::Compute
3101+ . constants
3102+ . select { |sym | sym . to_s . downcase == version . to_s . downcase . tr ( "_" , "" ) }
3103+ . first
3104+ service_module = Google ::Cloud ::Compute . const_get ( package_name ) . const_get ( :PreviewFeatures )
3105+ service_module . const_get ( :Rest ) . const_get ( :Client ) . new ( &block )
3106+ end
3107+
3108+ ##
3109+ # Determines whether the PreviewFeatures service is supported by the current client.
3110+ # If true, you can retrieve a client object by calling {Google::Cloud::Compute.preview_features}.
3111+ # If false, that method will raise an exception. This could happen if the given
3112+ # API version does not exist or does not support the PreviewFeatures service,
3113+ # or if the versioned client gem needs an update to support the PreviewFeatures service.
3114+ #
3115+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
3116+ # Defaults to `:v1`.
3117+ # @return [boolean] Whether the service is available.
3118+ #
3119+ def self . preview_features_available? version : :v1
3120+ require "google/cloud/compute/#{ version . to_s . downcase } "
3121+ package_name = Google ::Cloud ::Compute
3122+ . constants
3123+ . select { |sym | sym . to_s . downcase == version . to_s . downcase . tr ( "_" , "" ) }
3124+ . first
3125+ return false unless package_name
3126+ service_module = Google ::Cloud ::Compute . const_get package_name
3127+ return false unless service_module . const_defined? :PreviewFeatures
3128+ service_module = service_module . const_get :PreviewFeatures
3129+ return false unless service_module . const_defined? :Rest
3130+ service_module = service_module . const_get :Rest
3131+ service_module . const_defined? :Client
3132+ rescue ::LoadError
3133+ false
3134+ end
3135+
30103136 ##
30113137 # Create a new client object for Projects.
30123138 #
0 commit comments