From 4aff891d6af31c7d25dcde5fd7bb8a92704a2049 Mon Sep 17 00:00:00 2001 From: DCL Team Date: Wed, 20 Jul 2022 15:41:48 -0700 Subject: [PATCH] Automated DCL import. - 20f0b6c1c980ce17292dfc0cd4141f12406002ee Automatic import from cloud_mmv2_dcl_20220720_1531_RC00 by DCL Team GitOrigin-RevId: 20f0b6c1c980ce17292dfc0cd4141f12406002ee --- python/services/iam/alpha/workforce_pool.py | 9 --------- python/services/iam/beta/workforce_pool.py | 9 --------- python/services/iam/workforce_pool.py | 9 --------- services/google/iam/alpha/workforce_pool.yaml | 1 + .../iam/alpha/workforce_pool_alpha_yaml_embed.go | 6 +++--- services/google/iam/alpha/workforce_pool_internal.go | 12 +----------- services/google/iam/alpha/workforce_pool_schema.go | 1 + services/google/iam/beta/workforce_pool.yaml | 1 + .../iam/beta/workforce_pool_beta_yaml_embed.go | 6 +++--- services/google/iam/beta/workforce_pool_internal.go | 12 +----------- services/google/iam/beta/workforce_pool_schema.go | 1 + services/google/iam/workforce_pool.yaml | 1 + services/google/iam/workforce_pool_internal.go | 12 +----------- services/google/iam/workforce_pool_schema.go | 1 + services/google/iam/workforce_pool_yaml_embed.go | 6 +++--- 15 files changed, 18 insertions(+), 69 deletions(-) diff --git a/python/services/iam/alpha/workforce_pool.py b/python/services/iam/alpha/workforce_pool.py index 9b03d5321..2a1e4db3a 100755 --- a/python/services/iam/alpha/workforce_pool.py +++ b/python/services/iam/alpha/workforce_pool.py @@ -35,7 +35,6 @@ def __init__( channel.initialize() self.name = name - self.self_link = self_link self.parent = parent self.display_name = display_name self.description = description @@ -52,9 +51,6 @@ def apply(self): if Primitive.to_proto(self.name): request.resource.name = Primitive.to_proto(self.name) - if Primitive.to_proto(self.self_link): - request.resource.self_link = Primitive.to_proto(self.self_link) - if Primitive.to_proto(self.parent): request.resource.parent = Primitive.to_proto(self.parent) @@ -97,9 +93,6 @@ def delete(self): if Primitive.to_proto(self.name): request.resource.name = Primitive.to_proto(self.name) - if Primitive.to_proto(self.self_link): - request.resource.self_link = Primitive.to_proto(self.self_link) - if Primitive.to_proto(self.parent): request.resource.parent = Primitive.to_proto(self.parent) @@ -139,8 +132,6 @@ def to_proto(self): resource = workforce_pool_pb2.IamAlphaWorkforcePool() if Primitive.to_proto(self.name): resource.name = Primitive.to_proto(self.name) - if Primitive.to_proto(self.self_link): - resource.self_link = Primitive.to_proto(self.self_link) if Primitive.to_proto(self.parent): resource.parent = Primitive.to_proto(self.parent) if Primitive.to_proto(self.display_name): diff --git a/python/services/iam/beta/workforce_pool.py b/python/services/iam/beta/workforce_pool.py index cb8a4354b..683ea153f 100755 --- a/python/services/iam/beta/workforce_pool.py +++ b/python/services/iam/beta/workforce_pool.py @@ -35,7 +35,6 @@ def __init__( channel.initialize() self.name = name - self.self_link = self_link self.parent = parent self.display_name = display_name self.description = description @@ -52,9 +51,6 @@ def apply(self): if Primitive.to_proto(self.name): request.resource.name = Primitive.to_proto(self.name) - if Primitive.to_proto(self.self_link): - request.resource.self_link = Primitive.to_proto(self.self_link) - if Primitive.to_proto(self.parent): request.resource.parent = Primitive.to_proto(self.parent) @@ -97,9 +93,6 @@ def delete(self): if Primitive.to_proto(self.name): request.resource.name = Primitive.to_proto(self.name) - if Primitive.to_proto(self.self_link): - request.resource.self_link = Primitive.to_proto(self.self_link) - if Primitive.to_proto(self.parent): request.resource.parent = Primitive.to_proto(self.parent) @@ -139,8 +132,6 @@ def to_proto(self): resource = workforce_pool_pb2.IamBetaWorkforcePool() if Primitive.to_proto(self.name): resource.name = Primitive.to_proto(self.name) - if Primitive.to_proto(self.self_link): - resource.self_link = Primitive.to_proto(self.self_link) if Primitive.to_proto(self.parent): resource.parent = Primitive.to_proto(self.parent) if Primitive.to_proto(self.display_name): diff --git a/python/services/iam/workforce_pool.py b/python/services/iam/workforce_pool.py index 7d31b45f2..a84fe6f16 100755 --- a/python/services/iam/workforce_pool.py +++ b/python/services/iam/workforce_pool.py @@ -35,7 +35,6 @@ def __init__( channel.initialize() self.name = name - self.self_link = self_link self.parent = parent self.display_name = display_name self.description = description @@ -50,9 +49,6 @@ def apply(self): if Primitive.to_proto(self.name): request.resource.name = Primitive.to_proto(self.name) - if Primitive.to_proto(self.self_link): - request.resource.self_link = Primitive.to_proto(self.self_link) - if Primitive.to_proto(self.parent): request.resource.parent = Primitive.to_proto(self.parent) @@ -93,9 +89,6 @@ def delete(self): if Primitive.to_proto(self.name): request.resource.name = Primitive.to_proto(self.name) - if Primitive.to_proto(self.self_link): - request.resource.self_link = Primitive.to_proto(self.self_link) - if Primitive.to_proto(self.parent): request.resource.parent = Primitive.to_proto(self.parent) @@ -133,8 +126,6 @@ def to_proto(self): resource = workforce_pool_pb2.IamWorkforcePool() if Primitive.to_proto(self.name): resource.name = Primitive.to_proto(self.name) - if Primitive.to_proto(self.self_link): - resource.self_link = Primitive.to_proto(self.self_link) if Primitive.to_proto(self.parent): resource.parent = Primitive.to_proto(self.parent) if Primitive.to_proto(self.display_name): diff --git a/services/google/iam/alpha/workforce_pool.yaml b/services/google/iam/alpha/workforce_pool.yaml index 79cb4ce35..a7f7982c1 100755 --- a/services/google/iam/alpha/workforce_pool.yaml +++ b/services/google/iam/alpha/workforce_pool.yaml @@ -115,6 +115,7 @@ components: selfLink: type: string x-dcl-go-name: SelfLink + readOnly: true description: 'Output only. The resource name of the pool. Format: `locations/{location}/workforcePools/{workforce_pool_id}`' x-kubernetes-immutable: true sessionDuration: diff --git a/services/google/iam/alpha/workforce_pool_alpha_yaml_embed.go b/services/google/iam/alpha/workforce_pool_alpha_yaml_embed.go index 7a3633b9a..673346a46 100755 --- a/services/google/iam/alpha/workforce_pool_alpha_yaml_embed.go +++ b/services/google/iam/alpha/workforce_pool_alpha_yaml_embed.go @@ -17,7 +17,7 @@ package alpha // blaze-out/k8-fastbuild/genfiles/cloud/graphite/mmv2/services/google/iam/alpha/workforce_pool.yaml -var YAML_workforce_pool = []byte("info:\n title: Iam/WorkforcePool\n description: The Iam WorkforcePool resource\n x-dcl-struct-name: WorkforcePool\n x-dcl-has-iam: true\npaths:\n get:\n description: The function used to get information about a WorkforcePool\n parameters:\n - name: WorkforcePool\n required: true\n description: A full instance of a WorkforcePool\n apply:\n description: The function used to apply information about a WorkforcePool\n parameters:\n - name: WorkforcePool\n required: true\n description: A full instance of a WorkforcePool\n delete:\n description: The function used to delete a WorkforcePool\n parameters:\n - name: WorkforcePool\n required: true\n description: A full instance of a WorkforcePool\n deleteAll:\n description: The function used to delete all WorkforcePool\n parameters:\n - name: location\n required: true\n schema:\n type: string\n - name: parent\n required: true\n schema:\n type: string\n list:\n description: The function used to list information about many WorkforcePool\n parameters:\n - name: location\n required: true\n schema:\n type: string\n - name: parent\n required: true\n schema:\n type: string\ncomponents:\n schemas:\n WorkforcePool:\n title: WorkforcePool\n x-dcl-id: locations/{{location}}/workforcePools/{{name}}\n x-dcl-has-create: true\n x-dcl-has-iam: true\n x-dcl-read-timeout: 0\n x-dcl-apply-timeout: 0\n x-dcl-delete-timeout: 0\n type: object\n required:\n - name\n - parent\n - location\n properties:\n description:\n type: string\n x-dcl-go-name: Description\n description: A user-specified description of the pool. Cannot exceed 256\n characters.\n disabled:\n type: boolean\n x-dcl-go-name: Disabled\n description: Whether the pool is disabled. You cannot use a disabled pool\n to exchange tokens, or use existing tokens to access resources. If the\n pool is re-enabled, existing tokens grant access again.\n displayName:\n type: string\n x-dcl-go-name: DisplayName\n description: A user-specified display name of the pool in Google Cloud Console.\n Cannot exceed 32 characters.\n location:\n type: string\n x-dcl-go-name: Location\n description: The location for the resource\n x-kubernetes-immutable: true\n name:\n type: string\n x-dcl-go-name: Name\n description: The name of the pool. The ID must be a globally unique string\n of 6 to 63 lowercase letters, digits, or hyphens. It must start with a\n letter, and cannot have a trailing hyphen. The prefix `gcp-` is reserved\n for use by Google, and may not be specified.\n x-kubernetes-immutable: true\n parent:\n type: string\n x-dcl-go-name: Parent\n description: 'Immutable. The resource name of the parent. Format: `organizations/{org-id}`.'\n x-kubernetes-immutable: true\n x-dcl-forward-slash-allowed: true\n x-dcl-references:\n - resource: Cloudresourcemanager/Organization\n field: name\n parent: true\n selfLink:\n type: string\n x-dcl-go-name: SelfLink\n description: 'Output only. The resource name of the pool. Format: `locations/{location}/workforcePools/{workforce_pool_id}`'\n x-kubernetes-immutable: true\n sessionDuration:\n type: string\n x-dcl-go-name: SessionDuration\n description: How long the Google Cloud access tokens, console sign-in sessions,\n and gcloud sign-in sessions from this pool are valid. Must be greater\n than 15 minutes (900s) and less than 12 hours (43200s). If `session_duration`\n is not configured, minted credentials will have a default duration of\n one hour (3600s).\n state:\n type: string\n x-dcl-go-name: State\n x-dcl-go-type: WorkforcePoolStateEnum\n readOnly: true\n description: 'Output only. The state of the pool. Possible values: STATE_UNSPECIFIED,\n ACTIVE, DELETED'\n x-kubernetes-immutable: true\n enum:\n - STATE_UNSPECIFIED\n - ACTIVE\n - DELETED\n") +var YAML_workforce_pool = []byte("info:\n title: Iam/WorkforcePool\n description: The Iam WorkforcePool resource\n x-dcl-struct-name: WorkforcePool\n x-dcl-has-iam: true\npaths:\n get:\n description: The function used to get information about a WorkforcePool\n parameters:\n - name: WorkforcePool\n required: true\n description: A full instance of a WorkforcePool\n apply:\n description: The function used to apply information about a WorkforcePool\n parameters:\n - name: WorkforcePool\n required: true\n description: A full instance of a WorkforcePool\n delete:\n description: The function used to delete a WorkforcePool\n parameters:\n - name: WorkforcePool\n required: true\n description: A full instance of a WorkforcePool\n deleteAll:\n description: The function used to delete all WorkforcePool\n parameters:\n - name: location\n required: true\n schema:\n type: string\n - name: parent\n required: true\n schema:\n type: string\n list:\n description: The function used to list information about many WorkforcePool\n parameters:\n - name: location\n required: true\n schema:\n type: string\n - name: parent\n required: true\n schema:\n type: string\ncomponents:\n schemas:\n WorkforcePool:\n title: WorkforcePool\n x-dcl-id: locations/{{location}}/workforcePools/{{name}}\n x-dcl-has-create: true\n x-dcl-has-iam: true\n x-dcl-read-timeout: 0\n x-dcl-apply-timeout: 0\n x-dcl-delete-timeout: 0\n type: object\n required:\n - name\n - parent\n - location\n properties:\n description:\n type: string\n x-dcl-go-name: Description\n description: A user-specified description of the pool. Cannot exceed 256\n characters.\n disabled:\n type: boolean\n x-dcl-go-name: Disabled\n description: Whether the pool is disabled. You cannot use a disabled pool\n to exchange tokens, or use existing tokens to access resources. If the\n pool is re-enabled, existing tokens grant access again.\n displayName:\n type: string\n x-dcl-go-name: DisplayName\n description: A user-specified display name of the pool in Google Cloud Console.\n Cannot exceed 32 characters.\n location:\n type: string\n x-dcl-go-name: Location\n description: The location for the resource\n x-kubernetes-immutable: true\n name:\n type: string\n x-dcl-go-name: Name\n description: The name of the pool. The ID must be a globally unique string\n of 6 to 63 lowercase letters, digits, or hyphens. It must start with a\n letter, and cannot have a trailing hyphen. The prefix `gcp-` is reserved\n for use by Google, and may not be specified.\n x-kubernetes-immutable: true\n parent:\n type: string\n x-dcl-go-name: Parent\n description: 'Immutable. The resource name of the parent. Format: `organizations/{org-id}`.'\n x-kubernetes-immutable: true\n x-dcl-forward-slash-allowed: true\n x-dcl-references:\n - resource: Cloudresourcemanager/Organization\n field: name\n parent: true\n selfLink:\n type: string\n x-dcl-go-name: SelfLink\n readOnly: true\n description: 'Output only. The resource name of the pool. Format: `locations/{location}/workforcePools/{workforce_pool_id}`'\n x-kubernetes-immutable: true\n sessionDuration:\n type: string\n x-dcl-go-name: SessionDuration\n description: How long the Google Cloud access tokens, console sign-in sessions,\n and gcloud sign-in sessions from this pool are valid. Must be greater\n than 15 minutes (900s) and less than 12 hours (43200s). If `session_duration`\n is not configured, minted credentials will have a default duration of\n one hour (3600s).\n state:\n type: string\n x-dcl-go-name: State\n x-dcl-go-type: WorkforcePoolStateEnum\n readOnly: true\n description: 'Output only. The state of the pool. Possible values: STATE_UNSPECIFIED,\n ACTIVE, DELETED'\n x-kubernetes-immutable: true\n enum:\n - STATE_UNSPECIFIED\n - ACTIVE\n - DELETED\n") -// 4394 bytes -// MD5: 83a7c8c0ec2035e1700201ba02941531 +// 4419 bytes +// MD5: 2680b88e1578109195e36396679f82e5 diff --git a/services/google/iam/alpha/workforce_pool_internal.go b/services/google/iam/alpha/workforce_pool_internal.go index 5a5053bde..f61c4dd35 100755 --- a/services/google/iam/alpha/workforce_pool_internal.go +++ b/services/google/iam/alpha/workforce_pool_internal.go @@ -446,11 +446,6 @@ func canonicalizeWorkforcePoolDesiredState(rawDesired, rawInitial *WorkforcePool } else { canonicalDesired.Name = rawDesired.Name } - if dcl.PartialSelfLinkToSelfLink(rawDesired.SelfLink, rawInitial.SelfLink) { - canonicalDesired.SelfLink = rawInitial.SelfLink - } else { - canonicalDesired.SelfLink = rawDesired.SelfLink - } if dcl.StringCanonicalize(rawDesired.Parent, rawInitial.Parent) { canonicalDesired.Parent = rawInitial.Parent } else { @@ -572,7 +567,7 @@ func diffWorkforcePool(c *Client, desired, actual *WorkforcePool, opts ...dcl.Ap newDiffs = append(newDiffs, ds...) } - if ds, err := dcl.Diff(desired.SelfLink, actual.SelfLink, dcl.DiffInfo{OperationSelector: dcl.RequiresRecreate()}, fn.AddNest("Name")); len(ds) != 0 || err != nil { + if ds, err := dcl.Diff(desired.SelfLink, actual.SelfLink, dcl.DiffInfo{OutputOnly: true, OperationSelector: dcl.RequiresRecreate()}, fn.AddNest("Name")); len(ds) != 0 || err != nil { if err != nil { return nil, err } @@ -700,11 +695,6 @@ func expandWorkforcePool(c *Client, f *WorkforcePool) (map[string]interface{}, e } else if !dcl.IsEmptyValueIndirect(v) { m["name"] = v } - if v, err := dcl.DeriveField("locations/%s/workforcePools/%s", f.SelfLink, dcl.SelfLinkToName(f.Location), dcl.SelfLinkToName(f.Name)); err != nil { - return nil, fmt.Errorf("error expanding SelfLink into name: %w", err) - } else if !dcl.IsEmptyValueIndirect(v) { - m["name"] = v - } if v := f.Parent; dcl.ValueShouldBeSent(v) { m["parent"] = v } diff --git a/services/google/iam/alpha/workforce_pool_schema.go b/services/google/iam/alpha/workforce_pool_schema.go index 9465fcacd..20de710eb 100755 --- a/services/google/iam/alpha/workforce_pool_schema.go +++ b/services/google/iam/alpha/workforce_pool_schema.go @@ -154,6 +154,7 @@ func DCLWorkforcePoolSchema() *dcl.Schema { "selfLink": &dcl.Property{ Type: "string", GoName: "SelfLink", + ReadOnly: true, Description: "Output only. The resource name of the pool. Format: `locations/{location}/workforcePools/{workforce_pool_id}`", Immutable: true, }, diff --git a/services/google/iam/beta/workforce_pool.yaml b/services/google/iam/beta/workforce_pool.yaml index 79cb4ce35..a7f7982c1 100755 --- a/services/google/iam/beta/workforce_pool.yaml +++ b/services/google/iam/beta/workforce_pool.yaml @@ -115,6 +115,7 @@ components: selfLink: type: string x-dcl-go-name: SelfLink + readOnly: true description: 'Output only. The resource name of the pool. Format: `locations/{location}/workforcePools/{workforce_pool_id}`' x-kubernetes-immutable: true sessionDuration: diff --git a/services/google/iam/beta/workforce_pool_beta_yaml_embed.go b/services/google/iam/beta/workforce_pool_beta_yaml_embed.go index 90b4c8dd9..802365428 100755 --- a/services/google/iam/beta/workforce_pool_beta_yaml_embed.go +++ b/services/google/iam/beta/workforce_pool_beta_yaml_embed.go @@ -17,7 +17,7 @@ package beta // blaze-out/k8-fastbuild/genfiles/cloud/graphite/mmv2/services/google/iam/beta/workforce_pool.yaml -var YAML_workforce_pool = []byte("info:\n title: Iam/WorkforcePool\n description: The Iam WorkforcePool resource\n x-dcl-struct-name: WorkforcePool\n x-dcl-has-iam: true\npaths:\n get:\n description: The function used to get information about a WorkforcePool\n parameters:\n - name: WorkforcePool\n required: true\n description: A full instance of a WorkforcePool\n apply:\n description: The function used to apply information about a WorkforcePool\n parameters:\n - name: WorkforcePool\n required: true\n description: A full instance of a WorkforcePool\n delete:\n description: The function used to delete a WorkforcePool\n parameters:\n - name: WorkforcePool\n required: true\n description: A full instance of a WorkforcePool\n deleteAll:\n description: The function used to delete all WorkforcePool\n parameters:\n - name: location\n required: true\n schema:\n type: string\n - name: parent\n required: true\n schema:\n type: string\n list:\n description: The function used to list information about many WorkforcePool\n parameters:\n - name: location\n required: true\n schema:\n type: string\n - name: parent\n required: true\n schema:\n type: string\ncomponents:\n schemas:\n WorkforcePool:\n title: WorkforcePool\n x-dcl-id: locations/{{location}}/workforcePools/{{name}}\n x-dcl-has-create: true\n x-dcl-has-iam: true\n x-dcl-read-timeout: 0\n x-dcl-apply-timeout: 0\n x-dcl-delete-timeout: 0\n type: object\n required:\n - name\n - parent\n - location\n properties:\n description:\n type: string\n x-dcl-go-name: Description\n description: A user-specified description of the pool. Cannot exceed 256\n characters.\n disabled:\n type: boolean\n x-dcl-go-name: Disabled\n description: Whether the pool is disabled. You cannot use a disabled pool\n to exchange tokens, or use existing tokens to access resources. If the\n pool is re-enabled, existing tokens grant access again.\n displayName:\n type: string\n x-dcl-go-name: DisplayName\n description: A user-specified display name of the pool in Google Cloud Console.\n Cannot exceed 32 characters.\n location:\n type: string\n x-dcl-go-name: Location\n description: The location for the resource\n x-kubernetes-immutable: true\n name:\n type: string\n x-dcl-go-name: Name\n description: The name of the pool. The ID must be a globally unique string\n of 6 to 63 lowercase letters, digits, or hyphens. It must start with a\n letter, and cannot have a trailing hyphen. The prefix `gcp-` is reserved\n for use by Google, and may not be specified.\n x-kubernetes-immutable: true\n parent:\n type: string\n x-dcl-go-name: Parent\n description: 'Immutable. The resource name of the parent. Format: `organizations/{org-id}`.'\n x-kubernetes-immutable: true\n x-dcl-forward-slash-allowed: true\n x-dcl-references:\n - resource: Cloudresourcemanager/Organization\n field: name\n parent: true\n selfLink:\n type: string\n x-dcl-go-name: SelfLink\n description: 'Output only. The resource name of the pool. Format: `locations/{location}/workforcePools/{workforce_pool_id}`'\n x-kubernetes-immutable: true\n sessionDuration:\n type: string\n x-dcl-go-name: SessionDuration\n description: How long the Google Cloud access tokens, console sign-in sessions,\n and gcloud sign-in sessions from this pool are valid. Must be greater\n than 15 minutes (900s) and less than 12 hours (43200s). If `session_duration`\n is not configured, minted credentials will have a default duration of\n one hour (3600s).\n state:\n type: string\n x-dcl-go-name: State\n x-dcl-go-type: WorkforcePoolStateEnum\n readOnly: true\n description: 'Output only. The state of the pool. Possible values: STATE_UNSPECIFIED,\n ACTIVE, DELETED'\n x-kubernetes-immutable: true\n enum:\n - STATE_UNSPECIFIED\n - ACTIVE\n - DELETED\n") +var YAML_workforce_pool = []byte("info:\n title: Iam/WorkforcePool\n description: The Iam WorkforcePool resource\n x-dcl-struct-name: WorkforcePool\n x-dcl-has-iam: true\npaths:\n get:\n description: The function used to get information about a WorkforcePool\n parameters:\n - name: WorkforcePool\n required: true\n description: A full instance of a WorkforcePool\n apply:\n description: The function used to apply information about a WorkforcePool\n parameters:\n - name: WorkforcePool\n required: true\n description: A full instance of a WorkforcePool\n delete:\n description: The function used to delete a WorkforcePool\n parameters:\n - name: WorkforcePool\n required: true\n description: A full instance of a WorkforcePool\n deleteAll:\n description: The function used to delete all WorkforcePool\n parameters:\n - name: location\n required: true\n schema:\n type: string\n - name: parent\n required: true\n schema:\n type: string\n list:\n description: The function used to list information about many WorkforcePool\n parameters:\n - name: location\n required: true\n schema:\n type: string\n - name: parent\n required: true\n schema:\n type: string\ncomponents:\n schemas:\n WorkforcePool:\n title: WorkforcePool\n x-dcl-id: locations/{{location}}/workforcePools/{{name}}\n x-dcl-has-create: true\n x-dcl-has-iam: true\n x-dcl-read-timeout: 0\n x-dcl-apply-timeout: 0\n x-dcl-delete-timeout: 0\n type: object\n required:\n - name\n - parent\n - location\n properties:\n description:\n type: string\n x-dcl-go-name: Description\n description: A user-specified description of the pool. Cannot exceed 256\n characters.\n disabled:\n type: boolean\n x-dcl-go-name: Disabled\n description: Whether the pool is disabled. You cannot use a disabled pool\n to exchange tokens, or use existing tokens to access resources. If the\n pool is re-enabled, existing tokens grant access again.\n displayName:\n type: string\n x-dcl-go-name: DisplayName\n description: A user-specified display name of the pool in Google Cloud Console.\n Cannot exceed 32 characters.\n location:\n type: string\n x-dcl-go-name: Location\n description: The location for the resource\n x-kubernetes-immutable: true\n name:\n type: string\n x-dcl-go-name: Name\n description: The name of the pool. The ID must be a globally unique string\n of 6 to 63 lowercase letters, digits, or hyphens. It must start with a\n letter, and cannot have a trailing hyphen. The prefix `gcp-` is reserved\n for use by Google, and may not be specified.\n x-kubernetes-immutable: true\n parent:\n type: string\n x-dcl-go-name: Parent\n description: 'Immutable. The resource name of the parent. Format: `organizations/{org-id}`.'\n x-kubernetes-immutable: true\n x-dcl-forward-slash-allowed: true\n x-dcl-references:\n - resource: Cloudresourcemanager/Organization\n field: name\n parent: true\n selfLink:\n type: string\n x-dcl-go-name: SelfLink\n readOnly: true\n description: 'Output only. The resource name of the pool. Format: `locations/{location}/workforcePools/{workforce_pool_id}`'\n x-kubernetes-immutable: true\n sessionDuration:\n type: string\n x-dcl-go-name: SessionDuration\n description: How long the Google Cloud access tokens, console sign-in sessions,\n and gcloud sign-in sessions from this pool are valid. Must be greater\n than 15 minutes (900s) and less than 12 hours (43200s). If `session_duration`\n is not configured, minted credentials will have a default duration of\n one hour (3600s).\n state:\n type: string\n x-dcl-go-name: State\n x-dcl-go-type: WorkforcePoolStateEnum\n readOnly: true\n description: 'Output only. The state of the pool. Possible values: STATE_UNSPECIFIED,\n ACTIVE, DELETED'\n x-kubernetes-immutable: true\n enum:\n - STATE_UNSPECIFIED\n - ACTIVE\n - DELETED\n") -// 4394 bytes -// MD5: 83a7c8c0ec2035e1700201ba02941531 +// 4419 bytes +// MD5: 2680b88e1578109195e36396679f82e5 diff --git a/services/google/iam/beta/workforce_pool_internal.go b/services/google/iam/beta/workforce_pool_internal.go index 325b7e929..edb2a0f74 100755 --- a/services/google/iam/beta/workforce_pool_internal.go +++ b/services/google/iam/beta/workforce_pool_internal.go @@ -446,11 +446,6 @@ func canonicalizeWorkforcePoolDesiredState(rawDesired, rawInitial *WorkforcePool } else { canonicalDesired.Name = rawDesired.Name } - if dcl.PartialSelfLinkToSelfLink(rawDesired.SelfLink, rawInitial.SelfLink) { - canonicalDesired.SelfLink = rawInitial.SelfLink - } else { - canonicalDesired.SelfLink = rawDesired.SelfLink - } if dcl.StringCanonicalize(rawDesired.Parent, rawInitial.Parent) { canonicalDesired.Parent = rawInitial.Parent } else { @@ -572,7 +567,7 @@ func diffWorkforcePool(c *Client, desired, actual *WorkforcePool, opts ...dcl.Ap newDiffs = append(newDiffs, ds...) } - if ds, err := dcl.Diff(desired.SelfLink, actual.SelfLink, dcl.DiffInfo{OperationSelector: dcl.RequiresRecreate()}, fn.AddNest("Name")); len(ds) != 0 || err != nil { + if ds, err := dcl.Diff(desired.SelfLink, actual.SelfLink, dcl.DiffInfo{OutputOnly: true, OperationSelector: dcl.RequiresRecreate()}, fn.AddNest("Name")); len(ds) != 0 || err != nil { if err != nil { return nil, err } @@ -700,11 +695,6 @@ func expandWorkforcePool(c *Client, f *WorkforcePool) (map[string]interface{}, e } else if !dcl.IsEmptyValueIndirect(v) { m["name"] = v } - if v, err := dcl.DeriveField("locations/%s/workforcePools/%s", f.SelfLink, dcl.SelfLinkToName(f.Location), dcl.SelfLinkToName(f.Name)); err != nil { - return nil, fmt.Errorf("error expanding SelfLink into name: %w", err) - } else if !dcl.IsEmptyValueIndirect(v) { - m["name"] = v - } if v := f.Parent; dcl.ValueShouldBeSent(v) { m["parent"] = v } diff --git a/services/google/iam/beta/workforce_pool_schema.go b/services/google/iam/beta/workforce_pool_schema.go index 448c239f6..79c7dbcb0 100755 --- a/services/google/iam/beta/workforce_pool_schema.go +++ b/services/google/iam/beta/workforce_pool_schema.go @@ -154,6 +154,7 @@ func DCLWorkforcePoolSchema() *dcl.Schema { "selfLink": &dcl.Property{ Type: "string", GoName: "SelfLink", + ReadOnly: true, Description: "Output only. The resource name of the pool. Format: `locations/{location}/workforcePools/{workforce_pool_id}`", Immutable: true, }, diff --git a/services/google/iam/workforce_pool.yaml b/services/google/iam/workforce_pool.yaml index 79cb4ce35..a7f7982c1 100755 --- a/services/google/iam/workforce_pool.yaml +++ b/services/google/iam/workforce_pool.yaml @@ -115,6 +115,7 @@ components: selfLink: type: string x-dcl-go-name: SelfLink + readOnly: true description: 'Output only. The resource name of the pool. Format: `locations/{location}/workforcePools/{workforce_pool_id}`' x-kubernetes-immutable: true sessionDuration: diff --git a/services/google/iam/workforce_pool_internal.go b/services/google/iam/workforce_pool_internal.go index 5a8e87913..d195eda20 100755 --- a/services/google/iam/workforce_pool_internal.go +++ b/services/google/iam/workforce_pool_internal.go @@ -446,11 +446,6 @@ func canonicalizeWorkforcePoolDesiredState(rawDesired, rawInitial *WorkforcePool } else { canonicalDesired.Name = rawDesired.Name } - if dcl.PartialSelfLinkToSelfLink(rawDesired.SelfLink, rawInitial.SelfLink) { - canonicalDesired.SelfLink = rawInitial.SelfLink - } else { - canonicalDesired.SelfLink = rawDesired.SelfLink - } if dcl.StringCanonicalize(rawDesired.Parent, rawInitial.Parent) { canonicalDesired.Parent = rawInitial.Parent } else { @@ -572,7 +567,7 @@ func diffWorkforcePool(c *Client, desired, actual *WorkforcePool, opts ...dcl.Ap newDiffs = append(newDiffs, ds...) } - if ds, err := dcl.Diff(desired.SelfLink, actual.SelfLink, dcl.DiffInfo{OperationSelector: dcl.RequiresRecreate()}, fn.AddNest("Name")); len(ds) != 0 || err != nil { + if ds, err := dcl.Diff(desired.SelfLink, actual.SelfLink, dcl.DiffInfo{OutputOnly: true, OperationSelector: dcl.RequiresRecreate()}, fn.AddNest("Name")); len(ds) != 0 || err != nil { if err != nil { return nil, err } @@ -700,11 +695,6 @@ func expandWorkforcePool(c *Client, f *WorkforcePool) (map[string]interface{}, e } else if !dcl.IsEmptyValueIndirect(v) { m["name"] = v } - if v, err := dcl.DeriveField("locations/%s/workforcePools/%s", f.SelfLink, dcl.SelfLinkToName(f.Location), dcl.SelfLinkToName(f.Name)); err != nil { - return nil, fmt.Errorf("error expanding SelfLink into name: %w", err) - } else if !dcl.IsEmptyValueIndirect(v) { - m["name"] = v - } if v := f.Parent; dcl.ValueShouldBeSent(v) { m["parent"] = v } diff --git a/services/google/iam/workforce_pool_schema.go b/services/google/iam/workforce_pool_schema.go index 383706613..acd979c51 100755 --- a/services/google/iam/workforce_pool_schema.go +++ b/services/google/iam/workforce_pool_schema.go @@ -154,6 +154,7 @@ func DCLWorkforcePoolSchema() *dcl.Schema { "selfLink": &dcl.Property{ Type: "string", GoName: "SelfLink", + ReadOnly: true, Description: "Output only. The resource name of the pool. Format: `locations/{location}/workforcePools/{workforce_pool_id}`", Immutable: true, }, diff --git a/services/google/iam/workforce_pool_yaml_embed.go b/services/google/iam/workforce_pool_yaml_embed.go index 13ec036b9..49116c50b 100755 --- a/services/google/iam/workforce_pool_yaml_embed.go +++ b/services/google/iam/workforce_pool_yaml_embed.go @@ -17,7 +17,7 @@ package iam // blaze-out/k8-fastbuild/genfiles/cloud/graphite/mmv2/services/google/iam/workforce_pool.yaml -var YAML_workforce_pool = []byte("info:\n title: Iam/WorkforcePool\n description: The Iam WorkforcePool resource\n x-dcl-struct-name: WorkforcePool\n x-dcl-has-iam: true\npaths:\n get:\n description: The function used to get information about a WorkforcePool\n parameters:\n - name: WorkforcePool\n required: true\n description: A full instance of a WorkforcePool\n apply:\n description: The function used to apply information about a WorkforcePool\n parameters:\n - name: WorkforcePool\n required: true\n description: A full instance of a WorkforcePool\n delete:\n description: The function used to delete a WorkforcePool\n parameters:\n - name: WorkforcePool\n required: true\n description: A full instance of a WorkforcePool\n deleteAll:\n description: The function used to delete all WorkforcePool\n parameters:\n - name: location\n required: true\n schema:\n type: string\n - name: parent\n required: true\n schema:\n type: string\n list:\n description: The function used to list information about many WorkforcePool\n parameters:\n - name: location\n required: true\n schema:\n type: string\n - name: parent\n required: true\n schema:\n type: string\ncomponents:\n schemas:\n WorkforcePool:\n title: WorkforcePool\n x-dcl-id: locations/{{location}}/workforcePools/{{name}}\n x-dcl-has-create: true\n x-dcl-has-iam: true\n x-dcl-read-timeout: 0\n x-dcl-apply-timeout: 0\n x-dcl-delete-timeout: 0\n type: object\n required:\n - name\n - parent\n - location\n properties:\n description:\n type: string\n x-dcl-go-name: Description\n description: A user-specified description of the pool. Cannot exceed 256\n characters.\n disabled:\n type: boolean\n x-dcl-go-name: Disabled\n description: Whether the pool is disabled. You cannot use a disabled pool\n to exchange tokens, or use existing tokens to access resources. If the\n pool is re-enabled, existing tokens grant access again.\n displayName:\n type: string\n x-dcl-go-name: DisplayName\n description: A user-specified display name of the pool in Google Cloud Console.\n Cannot exceed 32 characters.\n location:\n type: string\n x-dcl-go-name: Location\n description: The location for the resource\n x-kubernetes-immutable: true\n name:\n type: string\n x-dcl-go-name: Name\n description: The name of the pool. The ID must be a globally unique string\n of 6 to 63 lowercase letters, digits, or hyphens. It must start with a\n letter, and cannot have a trailing hyphen. The prefix `gcp-` is reserved\n for use by Google, and may not be specified.\n x-kubernetes-immutable: true\n parent:\n type: string\n x-dcl-go-name: Parent\n description: 'Immutable. The resource name of the parent. Format: `organizations/{org-id}`.'\n x-kubernetes-immutable: true\n x-dcl-forward-slash-allowed: true\n x-dcl-references:\n - resource: Cloudresourcemanager/Organization\n field: name\n parent: true\n selfLink:\n type: string\n x-dcl-go-name: SelfLink\n description: 'Output only. The resource name of the pool. Format: `locations/{location}/workforcePools/{workforce_pool_id}`'\n x-kubernetes-immutable: true\n sessionDuration:\n type: string\n x-dcl-go-name: SessionDuration\n description: How long the Google Cloud access tokens, console sign-in sessions,\n and gcloud sign-in sessions from this pool are valid. Must be greater\n than 15 minutes (900s) and less than 12 hours (43200s). If `session_duration`\n is not configured, minted credentials will have a default duration of\n one hour (3600s).\n state:\n type: string\n x-dcl-go-name: State\n x-dcl-go-type: WorkforcePoolStateEnum\n readOnly: true\n description: 'Output only. The state of the pool. Possible values: STATE_UNSPECIFIED,\n ACTIVE, DELETED'\n x-kubernetes-immutable: true\n enum:\n - STATE_UNSPECIFIED\n - ACTIVE\n - DELETED\n") +var YAML_workforce_pool = []byte("info:\n title: Iam/WorkforcePool\n description: The Iam WorkforcePool resource\n x-dcl-struct-name: WorkforcePool\n x-dcl-has-iam: true\npaths:\n get:\n description: The function used to get information about a WorkforcePool\n parameters:\n - name: WorkforcePool\n required: true\n description: A full instance of a WorkforcePool\n apply:\n description: The function used to apply information about a WorkforcePool\n parameters:\n - name: WorkforcePool\n required: true\n description: A full instance of a WorkforcePool\n delete:\n description: The function used to delete a WorkforcePool\n parameters:\n - name: WorkforcePool\n required: true\n description: A full instance of a WorkforcePool\n deleteAll:\n description: The function used to delete all WorkforcePool\n parameters:\n - name: location\n required: true\n schema:\n type: string\n - name: parent\n required: true\n schema:\n type: string\n list:\n description: The function used to list information about many WorkforcePool\n parameters:\n - name: location\n required: true\n schema:\n type: string\n - name: parent\n required: true\n schema:\n type: string\ncomponents:\n schemas:\n WorkforcePool:\n title: WorkforcePool\n x-dcl-id: locations/{{location}}/workforcePools/{{name}}\n x-dcl-has-create: true\n x-dcl-has-iam: true\n x-dcl-read-timeout: 0\n x-dcl-apply-timeout: 0\n x-dcl-delete-timeout: 0\n type: object\n required:\n - name\n - parent\n - location\n properties:\n description:\n type: string\n x-dcl-go-name: Description\n description: A user-specified description of the pool. Cannot exceed 256\n characters.\n disabled:\n type: boolean\n x-dcl-go-name: Disabled\n description: Whether the pool is disabled. You cannot use a disabled pool\n to exchange tokens, or use existing tokens to access resources. If the\n pool is re-enabled, existing tokens grant access again.\n displayName:\n type: string\n x-dcl-go-name: DisplayName\n description: A user-specified display name of the pool in Google Cloud Console.\n Cannot exceed 32 characters.\n location:\n type: string\n x-dcl-go-name: Location\n description: The location for the resource\n x-kubernetes-immutable: true\n name:\n type: string\n x-dcl-go-name: Name\n description: The name of the pool. The ID must be a globally unique string\n of 6 to 63 lowercase letters, digits, or hyphens. It must start with a\n letter, and cannot have a trailing hyphen. The prefix `gcp-` is reserved\n for use by Google, and may not be specified.\n x-kubernetes-immutable: true\n parent:\n type: string\n x-dcl-go-name: Parent\n description: 'Immutable. The resource name of the parent. Format: `organizations/{org-id}`.'\n x-kubernetes-immutable: true\n x-dcl-forward-slash-allowed: true\n x-dcl-references:\n - resource: Cloudresourcemanager/Organization\n field: name\n parent: true\n selfLink:\n type: string\n x-dcl-go-name: SelfLink\n readOnly: true\n description: 'Output only. The resource name of the pool. Format: `locations/{location}/workforcePools/{workforce_pool_id}`'\n x-kubernetes-immutable: true\n sessionDuration:\n type: string\n x-dcl-go-name: SessionDuration\n description: How long the Google Cloud access tokens, console sign-in sessions,\n and gcloud sign-in sessions from this pool are valid. Must be greater\n than 15 minutes (900s) and less than 12 hours (43200s). If `session_duration`\n is not configured, minted credentials will have a default duration of\n one hour (3600s).\n state:\n type: string\n x-dcl-go-name: State\n x-dcl-go-type: WorkforcePoolStateEnum\n readOnly: true\n description: 'Output only. The state of the pool. Possible values: STATE_UNSPECIFIED,\n ACTIVE, DELETED'\n x-kubernetes-immutable: true\n enum:\n - STATE_UNSPECIFIED\n - ACTIVE\n - DELETED\n") -// 4394 bytes -// MD5: 83a7c8c0ec2035e1700201ba02941531 +// 4419 bytes +// MD5: 2680b88e1578109195e36396679f82e5