Module: Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Paths

Extended by:
Paths
Included in:
Client, Paths, Rest::Client
Defined in:
lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/paths.rb

Overview

Path helper methods for the IdentityMappingStoreService API.

Instance Method Summary collapse

Instance Method Details

#cmek_config_path(project: , location: ) ⇒ ::String #cmek_config_path(project: , location: , cmek_config: ) ⇒ ::String

Create a fully-qualified CmekConfig resource string.

Overloads:

  • #cmek_config_path(project: , location: ) ⇒ ::String

    The resource will be in the following format:

    projects/{project}/locations/{location}/cmekConfig

    Parameters:

    • project (String) (defaults to: )
    • location (String) (defaults to: )
  • #cmek_config_path(project: , location: , cmek_config: ) ⇒ ::String

    The resource will be in the following format:

    projects/{project}/locations/{location}/cmekConfigs/{cmek_config}

    Parameters:

    • project (String) (defaults to: )
    • location (String) (defaults to: )
    • cmek_config (String) (defaults to: )

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# File 'lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/paths.rb', line 48

def cmek_config_path **args
  resources = {
    "location:project" => (proc do |project:, location:|
      raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"

      "projects/#{project}/locations/#{location}/cmekConfig"
    end),
    "cmek_config:location:project" => (proc do |project:, location:, cmek_config:|
      raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
      raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"

      "projects/#{project}/locations/#{location}/cmekConfigs/#{cmek_config}"
    end)
  }

  resource = resources[args.keys.sort.join(":")]
  raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
  resource.call(**args)
end

#crypto_key_versions_path(project:, location:, key_ring:, crypto_key:, crypto_key_version:) ⇒ ::String

Create a fully-qualified CryptoKeyVersions resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}

Parameters:

  • project (String)
  • location (String)
  • key_ring (String)
  • crypto_key (String)
  • crypto_key_version (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


82
83
84
85
86
87
88
89
# File 'lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/paths.rb', line 82

def crypto_key_versions_path project:, location:, key_ring:, crypto_key:, crypto_key_version:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
  raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/"
  raise ::ArgumentError, "crypto_key cannot contain /" if crypto_key.to_s.include? "/"

  "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}/cryptoKeyVersions/#{crypto_key_version}"
end

#crypto_keys_path(project:, location:, key_ring:, crypto_key:) ⇒ ::String

Create a fully-qualified CryptoKeys resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}

Parameters:

  • project (String)
  • location (String)
  • key_ring (String)
  • crypto_key (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


104
105
106
107
108
109
110
# File 'lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/paths.rb', line 104

def crypto_keys_path project:, location:, key_ring:, crypto_key:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
  raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/"

  "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}"
end

#identity_mapping_store_path(project:, location:, identity_mapping_store:) ⇒ ::String

Create a fully-qualified IdentityMappingStore resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/identityMappingStores/{identity_mapping_store}

Parameters:

  • project (String)
  • location (String)
  • identity_mapping_store (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


124
125
126
127
128
129
# File 'lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/paths.rb', line 124

def identity_mapping_store_path project:, location:, identity_mapping_store:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"

  "projects/#{project}/locations/#{location}/identityMappingStores/#{identity_mapping_store}"
end

#location_path(project:, location:) ⇒ ::String

Create a fully-qualified Location resource string.

The resource will be in the following format:

projects/{project}/locations/{location}

Parameters:

  • project (String)
  • location (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


142
143
144
145
146
# File 'lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/paths.rb', line 142

def location_path project:, location:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"

  "projects/#{project}/locations/#{location}"
end