Import refactored library. See MIGRATING.MD for details

This commit is contained in:
Steven Bazyl committed 2015-06-23 15:15:14 -07:00
1 parent 9b7809174d
commit f584a2cec8
373 files changed
+255715 -474

No files matched your search

@@ -0,0 +1,660 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module ResourceviewsV1beta2
# The Label to be applied to the resource views.
class Label
include Google::Apis::Core::Hashable
# Key of the label.
# Corresponds to the JSON property `key`
# @return [String]
attr_accessor :key
# Value of the label.
# Corresponds to the JSON property `value`
# @return [String]
attr_accessor :value
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@key = args[:key] unless args[:key].nil?
@value = args[:value] unless args[:value].nil?
end
end
# The list response item that contains the resource and end points information.
class ListResourceResponseItem
include Google::Apis::Core::Hashable
# The list of service end points on the resource.
# Corresponds to the JSON property `endpoints`
# @return [Hash<String,Array<Fixnum>>]
attr_accessor :endpoints
# The full URL of the resource.
# Corresponds to the JSON property `resource`
# @return [String]
attr_accessor :resource
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@endpoints = args[:endpoints] unless args[:endpoints].nil?
@resource = args[:resource] unless args[:resource].nil?
end
end
# An operation resource, used to manage asynchronous API requests.
class Operation
include Google::Apis::Core::Hashable
# [Output only] An optional identifier specified by the client when the mutation
# was initiated. Must be unique for all operation resources in the project.
# Corresponds to the JSON property `clientOperationId`
# @return [String]
attr_accessor :client_operation_id
# [Output Only] The time that this operation was requested, in RFC3339 text
# format.
# Corresponds to the JSON property `creationTimestamp`
# @return [String]
attr_accessor :creation_timestamp
# [Output Only] The time that this operation was completed, in RFC3339 text
# format.
# Corresponds to the JSON property `endTime`
# @return [String]
attr_accessor :end_time
# [Output Only] If errors occurred during processing of this operation, this
# field will be populated.
# Corresponds to the JSON property `error`
# @return [Google::Apis::ResourceviewsV1beta2::Operation::Error]
attr_accessor :error
# [Output only] If operation fails, the HTTP error message returned.
# Corresponds to the JSON property `httpErrorMessage`
# @return [String]
attr_accessor :http_error_message
# [Output only] If operation fails, the HTTP error status code returned.
# Corresponds to the JSON property `httpErrorStatusCode`
# @return [Fixnum]
attr_accessor :http_error_status_code
# [Output Only] Unique identifier for the resource, generated by the server.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# [Output Only] The time that this operation was requested, in RFC3339 text
# format.
# Corresponds to the JSON property `insertTime`
# @return [String]
attr_accessor :insert_time
# [Output only] Type of the resource.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# [Output Only] Name of the resource.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# [Output only] Type of the operation. Operations include insert, update, and
# delete.
# Corresponds to the JSON property `operationType`
# @return [String]
attr_accessor :operation_type
# [Output only] An optional progress indicator that ranges from 0 to 100. There
# is no requirement that this be linear or support any granularity of operations.
# This should not be used to guess at when the operation will be complete. This
# number should be monotonically increasing as the operation progresses.
# Corresponds to the JSON property `progress`
# @return [Fixnum]
attr_accessor :progress
# [Output Only] URL of the region where the operation resides. Only available
# when performing regional operations.
# Corresponds to the JSON property `region`
# @return [String]
attr_accessor :region
# [Output Only] Server-defined fully-qualified URL for this resource.
# Corresponds to the JSON property `selfLink`
# @return [String]
attr_accessor :self_link
# [Output Only] The time that this operation was started by the server, in
# RFC3339 text format.
# Corresponds to the JSON property `startTime`
# @return [String]
attr_accessor :start_time
# [Output Only] Status of the operation.
# Corresponds to the JSON property `status`
# @return [String]
attr_accessor :status
# [Output Only] An optional textual description of the current status of the
# operation.
# Corresponds to the JSON property `statusMessage`
# @return [String]
attr_accessor :status_message
# [Output Only] Unique target ID which identifies a particular incarnation of
# the target.
# Corresponds to the JSON property `targetId`
# @return [String]
attr_accessor :target_id
# [Output only] URL of the resource the operation is mutating.
# Corresponds to the JSON property `targetLink`
# @return [String]
attr_accessor :target_link
# [Output Only] User who requested the operation, for example: user@example.com.
# Corresponds to the JSON property `user`
# @return [String]
attr_accessor :user
# [Output Only] If there are issues with this operation, a warning is returned.
# Corresponds to the JSON property `warnings`
# @return [Array<Google::Apis::ResourceviewsV1beta2::Operation::Warning>]
attr_accessor :warnings
# [Output Only] URL of the zone where the operation resides. Only available when
# performing per-zone operations.
# Corresponds to the JSON property `zone`
# @return [String]
attr_accessor :zone
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@client_operation_id = args[:client_operation_id] unless args[:client_operation_id].nil?
@creation_timestamp = args[:creation_timestamp] unless args[:creation_timestamp].nil?
@end_time = args[:end_time] unless args[:end_time].nil?
@error = args[:error] unless args[:error].nil?
@http_error_message = args[:http_error_message] unless args[:http_error_message].nil?
@http_error_status_code = args[:http_error_status_code] unless args[:http_error_status_code].nil?
@id = args[:id] unless args[:id].nil?
@insert_time = args[:insert_time] unless args[:insert_time].nil?
@kind = args[:kind] unless args[:kind].nil?
@name = args[:name] unless args[:name].nil?
@operation_type = args[:operation_type] unless args[:operation_type].nil?
@progress = args[:progress] unless args[:progress].nil?
@region = args[:region] unless args[:region].nil?
@self_link = args[:self_link] unless args[:self_link].nil?
@start_time = args[:start_time] unless args[:start_time].nil?
@status = args[:status] unless args[:status].nil?
@status_message = args[:status_message] unless args[:status_message].nil?
@target_id = args[:target_id] unless args[:target_id].nil?
@target_link = args[:target_link] unless args[:target_link].nil?
@user = args[:user] unless args[:user].nil?
@warnings = args[:warnings] unless args[:warnings].nil?
@zone = args[:zone] unless args[:zone].nil?
end
# [Output Only] If errors occurred during processing of this operation, this
# field will be populated.
class Error
include Google::Apis::Core::Hashable
# [Output Only] The array of errors encountered while processing this operation.
# Corresponds to the JSON property `errors`
# @return [Array<Google::Apis::ResourceviewsV1beta2::Operation::Error::Error>]
attr_accessor :errors
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@errors = args[:errors] unless args[:errors].nil?
end
#
class Error
include Google::Apis::Core::Hashable
# [Output Only] The error type identifier for this error.
# Corresponds to the JSON property `code`
# @return [String]
attr_accessor :code
# [Output Only] Indicates the field in the request which caused the error. This
# property is optional.
# Corresponds to the JSON property `location`
# @return [String]
attr_accessor :location
# [Output Only] An optional, human-readable error message.
# Corresponds to the JSON property `message`
# @return [String]
attr_accessor :message
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@code = args[:code] unless args[:code].nil?
@location = args[:location] unless args[:location].nil?
@message = args[:message] unless args[:message].nil?
end
end
end
#
class Warning
include Google::Apis::Core::Hashable
# [Output only] The warning type identifier for this warning.
# Corresponds to the JSON property `code`
# @return [String]
attr_accessor :code
# [Output only] Metadata for this warning in key:value format.
# Corresponds to the JSON property `data`
# @return [Array<Google::Apis::ResourceviewsV1beta2::Operation::Warning::Datum>]
attr_accessor :data
# [Output only] Optional human-readable details for this warning.
# Corresponds to the JSON property `message`
# @return [String]
attr_accessor :message
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@code = args[:code] unless args[:code].nil?
@data = args[:data] unless args[:data].nil?
@message = args[:message] unless args[:message].nil?
end
#
class Datum
include Google::Apis::Core::Hashable
# [Output Only] Metadata key for this warning.
# Corresponds to the JSON property `key`
# @return [String]
attr_accessor :key
# [Output Only] Metadata value for this warning.
# Corresponds to the JSON property `value`
# @return [String]
attr_accessor :value
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@key = args[:key] unless args[:key].nil?
@value = args[:value] unless args[:value].nil?
end
end
end
end
#
class OperationList
include Google::Apis::Core::Hashable
# Unique identifier for the resource; defined by the server (output only).
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# The operation resources.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::ResourceviewsV1beta2::Operation>]
attr_accessor :items
# Type of resource.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# A token used to continue a truncated list request (output only).
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
# Server defined URL for this resource (output only).
# Corresponds to the JSON property `selfLink`
# @return [String]
attr_accessor :self_link
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@id = args[:id] unless args[:id].nil?
@items = args[:items] unless args[:items].nil?
@kind = args[:kind] unless args[:kind].nil?
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
@self_link = args[:self_link] unless args[:self_link].nil?
end
end
# The resource view object.
class ResourceView
include Google::Apis::Core::Hashable
# The creation time of the resource view.
# Corresponds to the JSON property `creationTimestamp`
# @return [String]
attr_accessor :creation_timestamp
# The detailed description of the resource view.
# Corresponds to the JSON property `description`
# @return [String]
attr_accessor :description
# Services endpoint information.
# Corresponds to the JSON property `endpoints`
# @return [Array<Google::Apis::ResourceviewsV1beta2::ServiceEndpoint>]
attr_accessor :endpoints
# The fingerprint of the service endpoint information.
# Corresponds to the JSON property `fingerprint`
# @return [String]
attr_accessor :fingerprint
# [Output Only] The ID of the resource view.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Type of the resource.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The labels for events.
# Corresponds to the JSON property `labels`
# @return [Array<Google::Apis::ResourceviewsV1beta2::Label>]
attr_accessor :labels
# The name of the resource view.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# The URL of a Compute Engine network to which the resources in the view belong.
# Corresponds to the JSON property `network`
# @return [String]
attr_accessor :network
# A list of all resources in the resource view.
# Corresponds to the JSON property `resources`
# @return [Array<String>]
attr_accessor :resources
# [Output Only] A self-link to the resource view.
# Corresponds to the JSON property `selfLink`
# @return [String]
attr_accessor :self_link
# The total number of resources in the resource view.
# Corresponds to the JSON property `size`
# @return [Fixnum]
attr_accessor :size
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@creation_timestamp = args[:creation_timestamp] unless args[:creation_timestamp].nil?
@description = args[:description] unless args[:description].nil?
@endpoints = args[:endpoints] unless args[:endpoints].nil?
@fingerprint = args[:fingerprint] unless args[:fingerprint].nil?
@id = args[:id] unless args[:id].nil?
@kind = args[:kind] unless args[:kind].nil?
@labels = args[:labels] unless args[:labels].nil?
@name = args[:name] unless args[:name].nil?
@network = args[:network] unless args[:network].nil?
@resources = args[:resources] unless args[:resources].nil?
@self_link = args[:self_link] unless args[:self_link].nil?
@size = args[:size] unless args[:size].nil?
end
end
# The service endpoint that may be started in a VM.
class ServiceEndpoint
include Google::Apis::Core::Hashable
# The name of the service endpoint.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# The port of the service endpoint.
# Corresponds to the JSON property `port`
# @return [Fixnum]
attr_accessor :port
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@name = args[:name] unless args[:name].nil?
@port = args[:port] unless args[:port].nil?
end
end
# The request to add resources to the resource view.
class AddResourcesRequest
include Google::Apis::Core::Hashable
# The list of resources to be added.
# Corresponds to the JSON property `resources`
# @return [Array<String>]
attr_accessor :resources
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@resources = args[:resources] unless args[:resources].nil?
end
end
#
class GetServiceResponse
include Google::Apis::Core::Hashable
# The service information.
# Corresponds to the JSON property `endpoints`
# @return [Array<Google::Apis::ResourceviewsV1beta2::ServiceEndpoint>]
attr_accessor :endpoints
# The fingerprint of the service information.
# Corresponds to the JSON property `fingerprint`
# @return [String]
attr_accessor :fingerprint
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@endpoints = args[:endpoints] unless args[:endpoints].nil?
@fingerprint = args[:fingerprint] unless args[:fingerprint].nil?
end
end
# The response to a list request.
class ZoneViewsList
include Google::Apis::Core::Hashable
# The result that contains all resource views that meet the criteria.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::ResourceviewsV1beta2::ResourceView>]
attr_accessor :items
# Type of resource.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# A token used for pagination.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
# Server defined URL for this resource (output only).
# Corresponds to the JSON property `selfLink`
# @return [String]
attr_accessor :self_link
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@items = args[:items] unless args[:items].nil?
@kind = args[:kind] unless args[:kind].nil?
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
@self_link = args[:self_link] unless args[:self_link].nil?
end
end
# The response to a list resource request.
class ListResourcesResponse
include Google::Apis::Core::Hashable
# The formatted JSON that is requested by the user.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::ResourceviewsV1beta2::ListResourceResponseItem>]
attr_accessor :items
# The URL of a Compute Engine network to which the resources in the view belong.
# Corresponds to the JSON property `network`
# @return [String]
attr_accessor :network
# A token used for pagination.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@items = args[:items] unless args[:items].nil?
@network = args[:network] unless args[:network].nil?
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
end
end
# The request to remove resources from the resource view.
class RemoveResourcesRequest
include Google::Apis::Core::Hashable
# The list of resources to be removed.
# Corresponds to the JSON property `resources`
# @return [Array<String>]
attr_accessor :resources
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@resources = args[:resources] unless args[:resources].nil?
end
end
#
class SetServiceRequest
include Google::Apis::Core::Hashable
# The service information to be updated.
# Corresponds to the JSON property `endpoints`
# @return [Array<Google::Apis::ResourceviewsV1beta2::ServiceEndpoint>]
attr_accessor :endpoints
# Fingerprint of the service information; a hash of the contents. This field is
# used for optimistic locking when updating the service entries.
# Corresponds to the JSON property `fingerprint`
# @return [String]
attr_accessor :fingerprint
# The name of the resource if user wants to update the service information of
# the resource.
# Corresponds to the JSON property `resourceName`
# @return [String]
attr_accessor :resource_name
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@endpoints = args[:endpoints] unless args[:endpoints].nil?
@fingerprint = args[:fingerprint] unless args[:fingerprint].nil?
@resource_name = args[:resource_name] unless args[:resource_name].nil?
end
end
end
end
end
@@ -0,0 +1,269 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module ResourceviewsV1beta2
class Label
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListResourceResponseItem
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Operation
class Representation < Google::Apis::Core::JsonRepresentation; end
class Error
class Representation < Google::Apis::Core::JsonRepresentation; end
class Error
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
class Warning
class Representation < Google::Apis::Core::JsonRepresentation; end
class Datum
class Representation < Google::Apis::Core::JsonRepresentation; end
end
end
end
class OperationList
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ResourceView
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ServiceEndpoint
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class AddResourcesRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class GetServiceResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ZoneViewsList
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class ListResourcesResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class RemoveResourcesRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class SetServiceRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
end
# @private
class Label
class Representation < Google::Apis::Core::JsonRepresentation
property :key, as: 'key'
property :value, as: 'value'
end
end
# @private
class ListResourceResponseItem
class Representation < Google::Apis::Core::JsonRepresentation
hash :endpoints, as: 'endpoints', :class => Array do
include Representable::JSON::Collection
items
end
property :resource, as: 'resource'
end
end
# @private
class Operation
class Representation < Google::Apis::Core::JsonRepresentation
property :client_operation_id, as: 'clientOperationId'
property :creation_timestamp, as: 'creationTimestamp'
property :end_time, as: 'endTime'
property :error, as: 'error', class: Google::Apis::ResourceviewsV1beta2::Operation::Error, decorator: Google::Apis::ResourceviewsV1beta2::Operation::Error::Representation
property :http_error_message, as: 'httpErrorMessage'
property :http_error_status_code, as: 'httpErrorStatusCode'
property :id, as: 'id'
property :insert_time, as: 'insertTime'
property :kind, as: 'kind'
property :name, as: 'name'
property :operation_type, as: 'operationType'
property :progress, as: 'progress'
property :region, as: 'region'
property :self_link, as: 'selfLink'
property :start_time, as: 'startTime'
property :status, as: 'status'
property :status_message, as: 'statusMessage'
property :target_id, as: 'targetId'
property :target_link, as: 'targetLink'
property :user, as: 'user'
collection :warnings, as: 'warnings', class: Google::Apis::ResourceviewsV1beta2::Operation::Warning, decorator: Google::Apis::ResourceviewsV1beta2::Operation::Warning::Representation
property :zone, as: 'zone'
end
# @private
class Error
class Representation < Google::Apis::Core::JsonRepresentation
collection :errors, as: 'errors', class: Google::Apis::ResourceviewsV1beta2::Operation::Error::Error, decorator: Google::Apis::ResourceviewsV1beta2::Operation::Error::Error::Representation
end
# @private
class Error
class Representation < Google::Apis::Core::JsonRepresentation
property :code, as: 'code'
property :location, as: 'location'
property :message, as: 'message'
end
end
end
# @private
class Warning
class Representation < Google::Apis::Core::JsonRepresentation
property :code, as: 'code'
collection :data, as: 'data', class: Google::Apis::ResourceviewsV1beta2::Operation::Warning::Datum, decorator: Google::Apis::ResourceviewsV1beta2::Operation::Warning::Datum::Representation
property :message, as: 'message'
end
# @private
class Datum
class Representation < Google::Apis::Core::JsonRepresentation
property :key, as: 'key'
property :value, as: 'value'
end
end
end
end
# @private
class OperationList
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
collection :items, as: 'items', class: Google::Apis::ResourceviewsV1beta2::Operation, decorator: Google::Apis::ResourceviewsV1beta2::Operation::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
property :self_link, as: 'selfLink'
end
end
# @private
class ResourceView
class Representation < Google::Apis::Core::JsonRepresentation
property :creation_timestamp, as: 'creationTimestamp'
property :description, as: 'description'
collection :endpoints, as: 'endpoints', class: Google::Apis::ResourceviewsV1beta2::ServiceEndpoint, decorator: Google::Apis::ResourceviewsV1beta2::ServiceEndpoint::Representation
property :fingerprint, as: 'fingerprint'
property :id, as: 'id'
property :kind, as: 'kind'
collection :labels, as: 'labels', class: Google::Apis::ResourceviewsV1beta2::Label, decorator: Google::Apis::ResourceviewsV1beta2::Label::Representation
property :name, as: 'name'
property :network, as: 'network'
collection :resources, as: 'resources'
property :self_link, as: 'selfLink'
property :size, as: 'size'
end
end
# @private
class ServiceEndpoint
class Representation < Google::Apis::Core::JsonRepresentation
property :name, as: 'name'
property :port, as: 'port'
end
end
# @private
class AddResourcesRequest
class Representation < Google::Apis::Core::JsonRepresentation
collection :resources, as: 'resources'
end
end
# @private
class GetServiceResponse
class Representation < Google::Apis::Core::JsonRepresentation
collection :endpoints, as: 'endpoints', class: Google::Apis::ResourceviewsV1beta2::ServiceEndpoint, decorator: Google::Apis::ResourceviewsV1beta2::ServiceEndpoint::Representation
property :fingerprint, as: 'fingerprint'
end
end
# @private
class ZoneViewsList
class Representation < Google::Apis::Core::JsonRepresentation
collection :items, as: 'items', class: Google::Apis::ResourceviewsV1beta2::ResourceView, decorator: Google::Apis::ResourceviewsV1beta2::ResourceView::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
property :self_link, as: 'selfLink'
end
end
# @private
class ListResourcesResponse
class Representation < Google::Apis::Core::JsonRepresentation
collection :items, as: 'items', class: Google::Apis::ResourceviewsV1beta2::ListResourceResponseItem, decorator: Google::Apis::ResourceviewsV1beta2::ListResourceResponseItem::Representation
property :network, as: 'network'
property :next_page_token, as: 'nextPageToken'
end
end
# @private
class RemoveResourcesRequest
class Representation < Google::Apis::Core::JsonRepresentation
collection :resources, as: 'resources'
end
end
# @private
class SetServiceRequest
class Representation < Google::Apis::Core::JsonRepresentation
collection :endpoints, as: 'endpoints', class: Google::Apis::ResourceviewsV1beta2::ServiceEndpoint, decorator: Google::Apis::ResourceviewsV1beta2::ServiceEndpoint::Representation
property :fingerprint, as: 'fingerprint'
property :resource_name, as: 'resourceName'
end
end
end
end
end
@@ -0,0 +1,574 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module ResourceviewsV1beta2
# Google Compute Engine Instance Groups API
#
# The Resource View API allows users to create and manage logical sets of Google
# Compute Engine instances.
#
# @example
# require 'google/apis/resourceviews_v1beta2'
#
# Resourceviews = Google::Apis::ResourceviewsV1beta2 # Alias the module
# service = Resourceviews::ResourceviewsService.new
#
# @see https://developers.google.com/compute/
class ResourceviewsService < Google::Apis::Core::BaseService
# @return [String]
# API key. Your API key identifies your project and provides you with API access,
# quota, and reports. Required unless you provide an OAuth 2.0 token.
attr_accessor :key
# @return [String]
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
attr_accessor :quota_user
# @return [String]
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
attr_accessor :user_ip
def initialize
super('https://www.googleapis.com/', 'resourceviews/v1beta2/projects/')
end
# Retrieves the specified zone-specific operation resource.
# @param [String] project
# Name of the project scoping this request.
# @param [String] zone
# Name of the zone scoping this request.
# @param [String] operation
# Name of the operation resource to return.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::ResourceviewsV1beta2::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ResourceviewsV1beta2::Operation]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_zone_operation(project, zone, operation, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = '{project}/zones/{zone}/operations/{operation}'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::ResourceviewsV1beta2::Operation::Representation
command.response_class = Google::Apis::ResourceviewsV1beta2::Operation
command.params['project'] = project unless project.nil?
command.params['zone'] = zone unless zone.nil?
command.params['operation'] = operation unless operation.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Retrieves the list of operation resources contained within the specified zone.
# @param [String] project
# Name of the project scoping this request.
# @param [String] zone
# Name of the zone scoping this request.
# @param [String] filter
# Optional. Filter expression for filtering listed resources.
# @param [Fixnum] max_results
# Optional. Maximum count of results to be returned. Maximum value is 500 and
# default value is 500.
# @param [String] page_token
# Optional. Tag returned by a previous list request truncated by maxResults.
# Used to continue a previous list request.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::ResourceviewsV1beta2::OperationList] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ResourceviewsV1beta2::OperationList]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_zone_operations(project, zone, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = '{project}/zones/{zone}/operations'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::ResourceviewsV1beta2::OperationList::Representation
command.response_class = Google::Apis::ResourceviewsV1beta2::OperationList
command.params['project'] = project unless project.nil?
command.params['zone'] = zone unless zone.nil?
command.query['filter'] = filter unless filter.nil?
command.query['maxResults'] = max_results unless max_results.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Add resources to the view.
# @param [String] project
# The project name of the resource view.
# @param [String] zone
# The zone name of the resource view.
# @param [String] resource_view
# The name of the resource view.
# @param [Google::Apis::ResourceviewsV1beta2::AddResourcesRequest] add_resources_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::ResourceviewsV1beta2::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ResourceviewsV1beta2::Operation]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def add_resources_zone_view(project, zone, resource_view, add_resources_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = '{project}/zones/{zone}/resourceViews/{resourceView}/addResources'
command = make_simple_command(:post, path, options)
command.request_representation = Google::Apis::ResourceviewsV1beta2::AddResourcesRequest::Representation
command.request_object = add_resources_request_object
command.response_representation = Google::Apis::ResourceviewsV1beta2::Operation::Representation
command.response_class = Google::Apis::ResourceviewsV1beta2::Operation
command.params['project'] = project unless project.nil?
command.params['zone'] = zone unless zone.nil?
command.params['resourceView'] = resource_view unless resource_view.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Delete a resource view.
# @param [String] project
# The project name of the resource view.
# @param [String] zone
# The zone name of the resource view.
# @param [String] resource_view
# The name of the resource view.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::ResourceviewsV1beta2::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ResourceviewsV1beta2::Operation]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def delete_zone_view(project, zone, resource_view, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = '{project}/zones/{zone}/resourceViews/{resourceView}'
command = make_simple_command(:delete, path, options)
command.response_representation = Google::Apis::ResourceviewsV1beta2::Operation::Representation
command.response_class = Google::Apis::ResourceviewsV1beta2::Operation
command.params['project'] = project unless project.nil?
command.params['zone'] = zone unless zone.nil?
command.params['resourceView'] = resource_view unless resource_view.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Get the information of a zonal resource view.
# @param [String] project
# The project name of the resource view.
# @param [String] zone
# The zone name of the resource view.
# @param [String] resource_view
# The name of the resource view.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::ResourceviewsV1beta2::ResourceView] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ResourceviewsV1beta2::ResourceView]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_zone_view(project, zone, resource_view, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = '{project}/zones/{zone}/resourceViews/{resourceView}'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::ResourceviewsV1beta2::ResourceView::Representation
command.response_class = Google::Apis::ResourceviewsV1beta2::ResourceView
command.params['project'] = project unless project.nil?
command.params['zone'] = zone unless zone.nil?
command.params['resourceView'] = resource_view unless resource_view.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Get the service information of a resource view or a resource.
# @param [String] project
# The project name of the resource view.
# @param [String] zone
# The zone name of the resource view.
# @param [String] resource_view
# The name of the resource view.
# @param [String] resource_name
# The name of the resource if user wants to get the service information of the
# resource.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::ResourceviewsV1beta2::GetServiceResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ResourceviewsV1beta2::GetServiceResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_service_zone_view(project, zone, resource_view, resource_name: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = '{project}/zones/{zone}/resourceViews/{resourceView}/getService'
command = make_simple_command(:post, path, options)
command.response_representation = Google::Apis::ResourceviewsV1beta2::GetServiceResponse::Representation
command.response_class = Google::Apis::ResourceviewsV1beta2::GetServiceResponse
command.params['project'] = project unless project.nil?
command.params['zone'] = zone unless zone.nil?
command.params['resourceView'] = resource_view unless resource_view.nil?
command.query['resourceName'] = resource_name unless resource_name.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Create a resource view.
# @param [String] project
# The project name of the resource view.
# @param [String] zone
# The zone name of the resource view.
# @param [Google::Apis::ResourceviewsV1beta2::ResourceView] resource_view_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::ResourceviewsV1beta2::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ResourceviewsV1beta2::Operation]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def insert_zone_view(project, zone, resource_view_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = '{project}/zones/{zone}/resourceViews'
command = make_simple_command(:post, path, options)
command.request_representation = Google::Apis::ResourceviewsV1beta2::ResourceView::Representation
command.request_object = resource_view_object
command.response_representation = Google::Apis::ResourceviewsV1beta2::Operation::Representation
command.response_class = Google::Apis::ResourceviewsV1beta2::Operation
command.params['project'] = project unless project.nil?
command.params['zone'] = zone unless zone.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# List resource views.
# @param [String] project
# The project name of the resource view.
# @param [String] zone
# The zone name of the resource view.
# @param [Fixnum] max_results
# Maximum count of results to be returned. Acceptable values are 0 to 5000,
# inclusive. (Default: 5000)
# @param [String] page_token
# Specifies a nextPageToken returned by a previous list request. This token can
# be used to request the next page of results from a previous list request.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::ResourceviewsV1beta2::ZoneViewsList] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ResourceviewsV1beta2::ZoneViewsList]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_zone_views(project, zone, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = '{project}/zones/{zone}/resourceViews'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::ResourceviewsV1beta2::ZoneViewsList::Representation
command.response_class = Google::Apis::ResourceviewsV1beta2::ZoneViewsList
command.params['project'] = project unless project.nil?
command.params['zone'] = zone unless zone.nil?
command.query['maxResults'] = max_results unless max_results.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# List the resources of the resource view.
# @param [String] project
# The project name of the resource view.
# @param [String] zone
# The zone name of the resource view.
# @param [String] resource_view
# The name of the resource view.
# @param [String] format
# The requested format of the return value. It can be URL or URL_PORT. A JSON
# object will be included in the response based on the format. The default
# format is NONE, which results in no JSON in the response.
# @param [String] list_state
# The state of the instance to list. By default, it lists all instances.
# @param [Fixnum] max_results
# Maximum count of results to be returned. Acceptable values are 0 to 5000,
# inclusive. (Default: 5000)
# @param [String] page_token
# Specifies a nextPageToken returned by a previous list request. This token can
# be used to request the next page of results from a previous list request.
# @param [String] service_name
# The service name to return in the response. It is optional and if it is not
# set, all the service end points will be returned.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::ResourceviewsV1beta2::ListResourcesResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ResourceviewsV1beta2::ListResourcesResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_resources_zone_view(project, zone, resource_view, format: nil, list_state: nil, max_results: nil, page_token: nil, service_name: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = '{project}/zones/{zone}/resourceViews/{resourceView}/resources'
command = make_simple_command(:get, path, options)
command.response_representation = Google::Apis::ResourceviewsV1beta2::ListResourcesResponse::Representation
command.response_class = Google::Apis::ResourceviewsV1beta2::ListResourcesResponse
command.params['project'] = project unless project.nil?
command.params['zone'] = zone unless zone.nil?
command.params['resourceView'] = resource_view unless resource_view.nil?
command.query['format'] = format unless format.nil?
command.query['listState'] = list_state unless list_state.nil?
command.query['maxResults'] = max_results unless max_results.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['serviceName'] = service_name unless service_name.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Remove resources from the view.
# @param [String] project
# The project name of the resource view.
# @param [String] zone
# The zone name of the resource view.
# @param [String] resource_view
# The name of the resource view.
# @param [Google::Apis::ResourceviewsV1beta2::RemoveResourcesRequest] remove_resources_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::ResourceviewsV1beta2::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ResourceviewsV1beta2::Operation]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def remove_resources_zone_view(project, zone, resource_view, remove_resources_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = '{project}/zones/{zone}/resourceViews/{resourceView}/removeResources'
command = make_simple_command(:post, path, options)
command.request_representation = Google::Apis::ResourceviewsV1beta2::RemoveResourcesRequest::Representation
command.request_object = remove_resources_request_object
command.response_representation = Google::Apis::ResourceviewsV1beta2::Operation::Representation
command.response_class = Google::Apis::ResourceviewsV1beta2::Operation
command.params['project'] = project unless project.nil?
command.params['zone'] = zone unless zone.nil?
command.params['resourceView'] = resource_view unless resource_view.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Update the service information of a resource view or a resource.
# @param [String] project
# The project name of the resource view.
# @param [String] zone
# The zone name of the resource view.
# @param [String] resource_view
# The name of the resource view.
# @param [Google::Apis::ResourceviewsV1beta2::SetServiceRequest] set_service_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::ResourceviewsV1beta2::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ResourceviewsV1beta2::Operation]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def set_service_zone_view(project, zone, resource_view, set_service_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
path = '{project}/zones/{zone}/resourceViews/{resourceView}/setService'
command = make_simple_command(:post, path, options)
command.request_representation = Google::Apis::ResourceviewsV1beta2::SetServiceRequest::Representation
command.request_object = set_service_request_object
command.response_representation = Google::Apis::ResourceviewsV1beta2::Operation::Representation
command.response_class = Google::Apis::ResourceviewsV1beta2::Operation
command.params['project'] = project unless project.nil?
command.params['zone'] = zone unless zone.nil?
command.params['resourceView'] = resource_view unless resource_view.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
protected
def apply_command_defaults(command)
command.query['key'] = key unless key.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
end
end
end
end
end