Class: Google::Apis::CloudassetV1::Resource

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
generated/google/apis/cloudasset_v1/classes.rb,
generated/google/apis/cloudasset_v1/representations.rb,
generated/google/apis/cloudasset_v1/representations.rb

Overview

Representation of a cloud resource.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Resource

Returns a new instance of Resource.



1888
1889
1890
# File 'generated/google/apis/cloudasset_v1/classes.rb', line 1888

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#dataHash<String,Object>

The content of the resource, in which some sensitive fields are scrubbed away and may not be present. Corresponds to the JSON property data

Returns:

  • (Hash<String,Object>)


1843
1844
1845
# File 'generated/google/apis/cloudasset_v1/classes.rb', line 1843

def data
  @data
end

#discovery_document_uriString

The URL of the discovery document containing the resource's JSON schema. For example: "https://www.googleapis.com/discovery/v1/apis/compute/v1/rest". It will be left unspecified for resources without a discovery-based API, such as Cloud Bigtable. Corresponds to the JSON property discoveryDocumentUri

Returns:

  • (String)


1852
1853
1854
# File 'generated/google/apis/cloudasset_v1/classes.rb', line 1852

def discovery_document_uri
  @discovery_document_uri
end

#discovery_nameString

The JSON schema name listed in the discovery document. Example: "Project". It will be left unspecified for resources (such as Cloud Bigtable) without a discovery-based API. Corresponds to the JSON property discoveryName

Returns:

  • (String)


1859
1860
1861
# File 'generated/google/apis/cloudasset_v1/classes.rb', line 1859

def discovery_name
  @discovery_name
end

#parentString

The full name of the immediate parent of this resource. See Resource Names for more information. For GCP assets, it is the parent resource defined in the Cloud IAM policy hierarchy. For example: "//cloudresourcemanager.googleapis.com/projects/my_project_123". For third-party assets, it is up to the users to define. Corresponds to the JSON property parent

Returns:

  • (String)


1872
1873
1874
# File 'generated/google/apis/cloudasset_v1/classes.rb', line 1872

def parent
  @parent
end

#resource_urlString

The REST URL for accessing the resource. An HTTP GET operation using this URL returns the resource itself. Example: https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123. It will be left unspecified for resources without a REST API. Corresponds to the JSON property resourceUrl

Returns:

  • (String)


1881
1882
1883
# File 'generated/google/apis/cloudasset_v1/classes.rb', line 1881

def resource_url
  @resource_url
end

#versionString

The API version. Example: "v1". Corresponds to the JSON property version

Returns:

  • (String)


1886
1887
1888
# File 'generated/google/apis/cloudasset_v1/classes.rb', line 1886

def version
  @version
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1893
1894
1895
1896
1897
1898
1899
1900
# File 'generated/google/apis/cloudasset_v1/classes.rb', line 1893

def update!(**args)
  @data = args[:data] if args.key?(:data)
  @discovery_document_uri = args[:discovery_document_uri] if args.key?(:discovery_document_uri)
  @discovery_name = args[:discovery_name] if args.key?(:discovery_name)
  @parent = args[:parent] if args.key?(:parent)
  @resource_url = args[:resource_url] if args.key?(:resource_url)
  @version = args[:version] if args.key?(:version)
end