diff --git a/python/proto/run/alpha/job.proto b/python/proto/run/alpha/job.proto index d671419e9..a1607bfda 100755 --- a/python/proto/run/alpha/job.proto +++ b/python/proto/run/alpha/job.proto @@ -71,17 +71,16 @@ enum RunAlphaJobTerminalConditionReasonEnum { RunAlphaJobTerminalConditionReasonEnumROUTE_MISSING = 3; RunAlphaJobTerminalConditionReasonEnumREVISION_FAILED = 4; RunAlphaJobTerminalConditionReasonEnumPROGRESS_DEADLINE_EXCEEDED = 5; - RunAlphaJobTerminalConditionReasonEnumBUILD_STEP_FAILED = 6; - RunAlphaJobTerminalConditionReasonEnumCONTAINER_MISSING = 7; - RunAlphaJobTerminalConditionReasonEnumCONTAINER_PERMISSION_DENIED = 8; - RunAlphaJobTerminalConditionReasonEnumCONTAINER_IMAGE_UNAUTHORIZED = 9; - RunAlphaJobTerminalConditionReasonEnumCONTAINER_IMAGE_AUTHORIZATION_CHECK_FAILED = 10; - RunAlphaJobTerminalConditionReasonEnumENCRYPTION_KEY_PERMISSION_DENIED = 11; - RunAlphaJobTerminalConditionReasonEnumENCRYPTION_KEY_CHECK_FAILED = 12; - RunAlphaJobTerminalConditionReasonEnumSECRETS_ACCESS_CHECK_FAILED = 13; - RunAlphaJobTerminalConditionReasonEnumWAITING_FOR_OPERATION = 14; - RunAlphaJobTerminalConditionReasonEnumIMMEDIATE_RETRY = 15; - RunAlphaJobTerminalConditionReasonEnumPOSTPONED_RETRY = 16; + RunAlphaJobTerminalConditionReasonEnumCONTAINER_MISSING = 6; + RunAlphaJobTerminalConditionReasonEnumCONTAINER_PERMISSION_DENIED = 7; + RunAlphaJobTerminalConditionReasonEnumCONTAINER_IMAGE_UNAUTHORIZED = 8; + RunAlphaJobTerminalConditionReasonEnumCONTAINER_IMAGE_AUTHORIZATION_CHECK_FAILED = 9; + RunAlphaJobTerminalConditionReasonEnumENCRYPTION_KEY_PERMISSION_DENIED = 10; + RunAlphaJobTerminalConditionReasonEnumENCRYPTION_KEY_CHECK_FAILED = 11; + RunAlphaJobTerminalConditionReasonEnumSECRETS_ACCESS_CHECK_FAILED = 12; + RunAlphaJobTerminalConditionReasonEnumWAITING_FOR_OPERATION = 13; + RunAlphaJobTerminalConditionReasonEnumIMMEDIATE_RETRY = 14; + RunAlphaJobTerminalConditionReasonEnumPOSTPONED_RETRY = 15; } enum RunAlphaJobTerminalConditionInternalReasonEnum { @@ -151,43 +150,19 @@ enum RunAlphaJobConditionsReasonEnum { RunAlphaJobConditionsReasonEnumNO_VALUE_DO_NOT_USE = 0; RunAlphaJobConditionsReasonEnumCOMMON_REASON_UNDEFINED = 1; RunAlphaJobConditionsReasonEnumUNKNOWN = 2; - RunAlphaJobConditionsReasonEnumROUTE_MISSING = 3; - RunAlphaJobConditionsReasonEnumREVISION_FAILED = 4; - RunAlphaJobConditionsReasonEnumPROGRESS_DEADLINE_EXCEEDED = 5; - RunAlphaJobConditionsReasonEnumBUILD_STEP_FAILED = 6; - RunAlphaJobConditionsReasonEnumCONTAINER_MISSING = 7; - RunAlphaJobConditionsReasonEnumCONTAINER_PERMISSION_DENIED = 8; - RunAlphaJobConditionsReasonEnumCONTAINER_IMAGE_UNAUTHORIZED = 9; - RunAlphaJobConditionsReasonEnumCONTAINER_IMAGE_AUTHORIZATION_CHECK_FAILED = 10; - RunAlphaJobConditionsReasonEnumENCRYPTION_KEY_PERMISSION_DENIED = 11; - RunAlphaJobConditionsReasonEnumENCRYPTION_KEY_CHECK_FAILED = 12; - RunAlphaJobConditionsReasonEnumSECRETS_ACCESS_CHECK_FAILED = 13; - RunAlphaJobConditionsReasonEnumWAITING_FOR_OPERATION = 14; - RunAlphaJobConditionsReasonEnumIMMEDIATE_RETRY = 15; - RunAlphaJobConditionsReasonEnumPOSTPONED_RETRY = 16; -} - -enum RunAlphaJobConditionsInternalReasonEnum { - RunAlphaJobConditionsInternalReasonEnumNO_VALUE_DO_NOT_USE = 0; - RunAlphaJobConditionsInternalReasonEnumINTERNAL_REASON_UNDEFINED = 1; - RunAlphaJobConditionsInternalReasonEnumCONFLICTING_REVISION_NAME = 2; - RunAlphaJobConditionsInternalReasonEnumREVISION_MISSING = 3; - RunAlphaJobConditionsInternalReasonEnumCONFIGURATION_MISSING = 4; - RunAlphaJobConditionsInternalReasonEnumASSIGNING_TRAFFIC = 5; - RunAlphaJobConditionsInternalReasonEnumUPDATING_INGRESS_TRAFFIC_ALLOWED = 6; - RunAlphaJobConditionsInternalReasonEnumREVISION_ORG_POLICY_VIOLATION = 7; - RunAlphaJobConditionsInternalReasonEnumENABLING_GCFV2_URI_SUPPORT = 8; -} - -enum RunAlphaJobConditionsDomainMappingReasonEnum { - RunAlphaJobConditionsDomainMappingReasonEnumNO_VALUE_DO_NOT_USE = 0; - RunAlphaJobConditionsDomainMappingReasonEnumDOMAIN_MAPPING_REASON_UNDEFINED = 1; - RunAlphaJobConditionsDomainMappingReasonEnumROUTE_NOT_READY = 2; - RunAlphaJobConditionsDomainMappingReasonEnumPERMISSION_DENIED = 3; - RunAlphaJobConditionsDomainMappingReasonEnumCERTIFICATE_ALREADY_EXISTS = 4; - RunAlphaJobConditionsDomainMappingReasonEnumMAPPING_ALREADY_EXISTS = 5; - RunAlphaJobConditionsDomainMappingReasonEnumCERTIFICATE_PENDING = 6; - RunAlphaJobConditionsDomainMappingReasonEnumCERTIFICATE_FAILED = 7; + RunAlphaJobConditionsReasonEnumREVISION_FAILED = 3; + RunAlphaJobConditionsReasonEnumPROGRESS_DEADLINE_EXCEEDED = 4; + RunAlphaJobConditionsReasonEnumBUILD_STEP_FAILED = 5; + RunAlphaJobConditionsReasonEnumCONTAINER_MISSING = 6; + RunAlphaJobConditionsReasonEnumCONTAINER_PERMISSION_DENIED = 7; + RunAlphaJobConditionsReasonEnumCONTAINER_IMAGE_UNAUTHORIZED = 8; + RunAlphaJobConditionsReasonEnumCONTAINER_IMAGE_AUTHORIZATION_CHECK_FAILED = 9; + RunAlphaJobConditionsReasonEnumENCRYPTION_KEY_PERMISSION_DENIED = 10; + RunAlphaJobConditionsReasonEnumENCRYPTION_KEY_CHECK_FAILED = 11; + RunAlphaJobConditionsReasonEnumSECRETS_ACCESS_CHECK_FAILED = 12; + RunAlphaJobConditionsReasonEnumWAITING_FOR_OPERATION = 13; + RunAlphaJobConditionsReasonEnumIMMEDIATE_RETRY = 14; + RunAlphaJobConditionsReasonEnumPOSTPONED_RETRY = 15; } enum RunAlphaJobConditionsRevisionReasonEnum { @@ -237,10 +212,9 @@ message RunAlphaJob { RunAlphaJobLatestSucceededExecution latest_succeeded_execution = 21; RunAlphaJobLatestCreatedExecution latest_created_execution = 22; bool reconciling = 23; - repeated RunAlphaJobContainerStatuses container_statuses = 24; - string etag = 25; - string project = 26; - string location = 27; + string etag = 24; + string project = 25; + string location = 26; } message RunAlphaJobBinaryAuthorization { @@ -355,10 +329,8 @@ message RunAlphaJobConditions { string last_transition_time = 4; RunAlphaJobConditionsSeverityEnum severity = 5; RunAlphaJobConditionsReasonEnum reason = 6; - RunAlphaJobConditionsInternalReasonEnum internal_reason = 7; - RunAlphaJobConditionsDomainMappingReasonEnum domain_mapping_reason = 8; - RunAlphaJobConditionsRevisionReasonEnum revision_reason = 9; - RunAlphaJobConditionsExecutionReasonEnum execution_reason = 10; + RunAlphaJobConditionsRevisionReasonEnum revision_reason = 7; + RunAlphaJobConditionsExecutionReasonEnum execution_reason = 8; } message RunAlphaJobLatestSucceededExecution { @@ -371,11 +343,6 @@ message RunAlphaJobLatestCreatedExecution { string create_time = 2; } -message RunAlphaJobContainerStatuses { - string name = 1; - string image_digest = 2; -} - message ApplyRunAlphaJobRequest { RunAlphaJob resource = 1; repeated LifecycleDirective lifecycle_directives = 2; diff --git a/python/services/run/alpha/job.py b/python/services/run/alpha/job.py index f69b8afeb..b7e4319e6 100755 --- a/python/services/run/alpha/job.py +++ b/python/services/run/alpha/job.py @@ -44,7 +44,6 @@ def __init__( latest_succeeded_execution: dict = None, latest_created_execution: dict = None, reconciling: bool = None, - container_statuses: list = None, etag: str = None, project: str = None, location: str = None, @@ -133,9 +132,6 @@ def apply(self): response.latest_created_execution ) self.reconciling = Primitive.from_proto(response.reconciling) - self.container_statuses = JobContainerStatusesArray.from_proto( - response.container_statuses - ) self.etag = Primitive.from_proto(response.etag) self.project = Primitive.from_proto(response.project) self.location = Primitive.from_proto(response.location) @@ -1125,8 +1121,6 @@ def __init__( last_transition_time: str = None, severity: str = None, reason: str = None, - internal_reason: str = None, - domain_mapping_reason: str = None, revision_reason: str = None, execution_reason: str = None, ): @@ -1136,8 +1130,6 @@ def __init__( self.last_transition_time = last_transition_time self.severity = severity self.reason = reason - self.internal_reason = internal_reason - self.domain_mapping_reason = domain_mapping_reason self.revision_reason = revision_reason self.execution_reason = execution_reason @@ -1159,16 +1151,6 @@ def to_proto(self, resource): res.severity = JobConditionsSeverityEnum.to_proto(resource.severity) if JobConditionsReasonEnum.to_proto(resource.reason): res.reason = JobConditionsReasonEnum.to_proto(resource.reason) - if JobConditionsInternalReasonEnum.to_proto(resource.internal_reason): - res.internal_reason = JobConditionsInternalReasonEnum.to_proto( - resource.internal_reason - ) - if JobConditionsDomainMappingReasonEnum.to_proto( - resource.domain_mapping_reason - ): - res.domain_mapping_reason = JobConditionsDomainMappingReasonEnum.to_proto( - resource.domain_mapping_reason - ) if JobConditionsRevisionReasonEnum.to_proto(resource.revision_reason): res.revision_reason = JobConditionsRevisionReasonEnum.to_proto( resource.revision_reason @@ -1191,12 +1173,6 @@ def from_proto(self, resource): last_transition_time=Primitive.from_proto(resource.last_transition_time), severity=JobConditionsSeverityEnum.from_proto(resource.severity), reason=JobConditionsReasonEnum.from_proto(resource.reason), - internal_reason=JobConditionsInternalReasonEnum.from_proto( - resource.internal_reason - ), - domain_mapping_reason=JobConditionsDomainMappingReasonEnum.from_proto( - resource.domain_mapping_reason - ), revision_reason=JobConditionsRevisionReasonEnum.from_proto( resource.revision_reason ), @@ -1298,46 +1274,6 @@ def from_proto(self, resources): return [JobLatestCreatedExecution.from_proto(i) for i in resources] -class JobContainerStatuses(object): - def __init__(self, name: str = None, image_digest: str = None): - self.name = name - self.image_digest = image_digest - - @classmethod - def to_proto(self, resource): - if not resource: - return None - - res = job_pb2.RunAlphaJobContainerStatuses() - if Primitive.to_proto(resource.name): - res.name = Primitive.to_proto(resource.name) - if Primitive.to_proto(resource.image_digest): - res.image_digest = Primitive.to_proto(resource.image_digest) - return res - - @classmethod - def from_proto(self, resource): - if not resource: - return None - - return JobContainerStatuses( - name=Primitive.from_proto(resource.name), - image_digest=Primitive.from_proto(resource.image_digest), - ) - - -class JobContainerStatusesArray(object): - @classmethod - def to_proto(self, resources): - if not resources: - return resources - return [JobContainerStatuses.to_proto(i) for i in resources] - - @classmethod - def from_proto(self, resources): - return [JobContainerStatuses.from_proto(i) for i in resources] - - class JobLaunchStageEnum(object): @classmethod def to_proto(self, resource): @@ -1572,42 +1508,6 @@ def from_proto(self, resource): ] -class JobConditionsInternalReasonEnum(object): - @classmethod - def to_proto(self, resource): - if not resource: - return resource - return job_pb2.RunAlphaJobConditionsInternalReasonEnum.Value( - "RunAlphaJobConditionsInternalReasonEnum%s" % resource - ) - - @classmethod - def from_proto(self, resource): - if not resource: - return resource - return job_pb2.RunAlphaJobConditionsInternalReasonEnum.Name(resource)[ - len("RunAlphaJobConditionsInternalReasonEnum") : - ] - - -class JobConditionsDomainMappingReasonEnum(object): - @classmethod - def to_proto(self, resource): - if not resource: - return resource - return job_pb2.RunAlphaJobConditionsDomainMappingReasonEnum.Value( - "RunAlphaJobConditionsDomainMappingReasonEnum%s" % resource - ) - - @classmethod - def from_proto(self, resource): - if not resource: - return resource - return job_pb2.RunAlphaJobConditionsDomainMappingReasonEnum.Name(resource)[ - len("RunAlphaJobConditionsDomainMappingReasonEnum") : - ] - - class JobConditionsRevisionReasonEnum(object): @classmethod def to_proto(self, resource): diff --git a/python/services/run/alpha/job_server.go b/python/services/run/alpha/job_server.go index 9959e8daf..33a877d57 100755 --- a/python/services/run/alpha/job_server.go +++ b/python/services/run/alpha/job_server.go @@ -180,30 +180,6 @@ func ProtoToRunAlphaJobConditionsReasonEnum(e alphapb.RunAlphaJobConditionsReaso return nil } -// ProtoToJobConditionsInternalReasonEnum converts a JobConditionsInternalReasonEnum enum from its proto representation. -func ProtoToRunAlphaJobConditionsInternalReasonEnum(e alphapb.RunAlphaJobConditionsInternalReasonEnum) *alpha.JobConditionsInternalReasonEnum { - if e == 0 { - return nil - } - if n, ok := alphapb.RunAlphaJobConditionsInternalReasonEnum_name[int32(e)]; ok { - e := alpha.JobConditionsInternalReasonEnum(n[len("RunAlphaJobConditionsInternalReasonEnum"):]) - return &e - } - return nil -} - -// ProtoToJobConditionsDomainMappingReasonEnum converts a JobConditionsDomainMappingReasonEnum enum from its proto representation. -func ProtoToRunAlphaJobConditionsDomainMappingReasonEnum(e alphapb.RunAlphaJobConditionsDomainMappingReasonEnum) *alpha.JobConditionsDomainMappingReasonEnum { - if e == 0 { - return nil - } - if n, ok := alphapb.RunAlphaJobConditionsDomainMappingReasonEnum_name[int32(e)]; ok { - e := alpha.JobConditionsDomainMappingReasonEnum(n[len("RunAlphaJobConditionsDomainMappingReasonEnum"):]) - return &e - } - return nil -} - // ProtoToJobConditionsRevisionReasonEnum converts a JobConditionsRevisionReasonEnum enum from its proto representation. func ProtoToRunAlphaJobConditionsRevisionReasonEnum(e alphapb.RunAlphaJobConditionsRevisionReasonEnum) *alpha.JobConditionsRevisionReasonEnum { if e == 0 { @@ -465,16 +441,14 @@ func ProtoToRunAlphaJobConditions(p *alphapb.RunAlphaJobConditions) *alpha.JobCo return nil } obj := &alpha.JobConditions{ - Type: dcl.StringOrNil(p.GetType()), - State: ProtoToRunAlphaJobConditionsStateEnum(p.GetState()), - Message: dcl.StringOrNil(p.GetMessage()), - LastTransitionTime: dcl.StringOrNil(p.GetLastTransitionTime()), - Severity: ProtoToRunAlphaJobConditionsSeverityEnum(p.GetSeverity()), - Reason: ProtoToRunAlphaJobConditionsReasonEnum(p.GetReason()), - InternalReason: ProtoToRunAlphaJobConditionsInternalReasonEnum(p.GetInternalReason()), - DomainMappingReason: ProtoToRunAlphaJobConditionsDomainMappingReasonEnum(p.GetDomainMappingReason()), - RevisionReason: ProtoToRunAlphaJobConditionsRevisionReasonEnum(p.GetRevisionReason()), - ExecutionReason: ProtoToRunAlphaJobConditionsExecutionReasonEnum(p.GetExecutionReason()), + Type: dcl.StringOrNil(p.GetType()), + State: ProtoToRunAlphaJobConditionsStateEnum(p.GetState()), + Message: dcl.StringOrNil(p.GetMessage()), + LastTransitionTime: dcl.StringOrNil(p.GetLastTransitionTime()), + Severity: ProtoToRunAlphaJobConditionsSeverityEnum(p.GetSeverity()), + Reason: ProtoToRunAlphaJobConditionsReasonEnum(p.GetReason()), + RevisionReason: ProtoToRunAlphaJobConditionsRevisionReasonEnum(p.GetRevisionReason()), + ExecutionReason: ProtoToRunAlphaJobConditionsExecutionReasonEnum(p.GetExecutionReason()), } return obj } @@ -503,18 +477,6 @@ func ProtoToRunAlphaJobLatestCreatedExecution(p *alphapb.RunAlphaJobLatestCreate return obj } -// ProtoToJobContainerStatuses converts a JobContainerStatuses object from its proto representation. -func ProtoToRunAlphaJobContainerStatuses(p *alphapb.RunAlphaJobContainerStatuses) *alpha.JobContainerStatuses { - if p == nil { - return nil - } - obj := &alpha.JobContainerStatuses{ - Name: dcl.StringOrNil(p.GetName()), - ImageDigest: dcl.StringOrNil(p.GetImageDigest()), - } - return obj -} - // ProtoToJob converts a Job resource from its proto representation. func ProtoToJob(p *alphapb.RunAlphaJob) *alpha.Job { obj := &alpha.Job{ @@ -545,9 +507,6 @@ func ProtoToJob(p *alphapb.RunAlphaJob) *alpha.Job { for _, r := range p.GetConditions() { obj.Conditions = append(obj.Conditions, *ProtoToRunAlphaJobConditions(r)) } - for _, r := range p.GetContainerStatuses() { - obj.ContainerStatuses = append(obj.ContainerStatuses, *ProtoToRunAlphaJobContainerStatuses(r)) - } return obj } @@ -694,28 +653,6 @@ func RunAlphaJobConditionsReasonEnumToProto(e *alpha.JobConditionsReasonEnum) al return alphapb.RunAlphaJobConditionsReasonEnum(0) } -// JobConditionsInternalReasonEnumToProto converts a JobConditionsInternalReasonEnum enum to its proto representation. -func RunAlphaJobConditionsInternalReasonEnumToProto(e *alpha.JobConditionsInternalReasonEnum) alphapb.RunAlphaJobConditionsInternalReasonEnum { - if e == nil { - return alphapb.RunAlphaJobConditionsInternalReasonEnum(0) - } - if v, ok := alphapb.RunAlphaJobConditionsInternalReasonEnum_value["JobConditionsInternalReasonEnum"+string(*e)]; ok { - return alphapb.RunAlphaJobConditionsInternalReasonEnum(v) - } - return alphapb.RunAlphaJobConditionsInternalReasonEnum(0) -} - -// JobConditionsDomainMappingReasonEnumToProto converts a JobConditionsDomainMappingReasonEnum enum to its proto representation. -func RunAlphaJobConditionsDomainMappingReasonEnumToProto(e *alpha.JobConditionsDomainMappingReasonEnum) alphapb.RunAlphaJobConditionsDomainMappingReasonEnum { - if e == nil { - return alphapb.RunAlphaJobConditionsDomainMappingReasonEnum(0) - } - if v, ok := alphapb.RunAlphaJobConditionsDomainMappingReasonEnum_value["JobConditionsDomainMappingReasonEnum"+string(*e)]; ok { - return alphapb.RunAlphaJobConditionsDomainMappingReasonEnum(v) - } - return alphapb.RunAlphaJobConditionsDomainMappingReasonEnum(0) -} - // JobConditionsRevisionReasonEnumToProto converts a JobConditionsRevisionReasonEnum enum to its proto representation. func RunAlphaJobConditionsRevisionReasonEnumToProto(e *alpha.JobConditionsRevisionReasonEnum) alphapb.RunAlphaJobConditionsRevisionReasonEnum { if e == nil { @@ -999,8 +936,6 @@ func RunAlphaJobConditionsToProto(o *alpha.JobConditions) *alphapb.RunAlphaJobCo p.SetLastTransitionTime(dcl.ValueOrEmptyString(o.LastTransitionTime)) p.SetSeverity(RunAlphaJobConditionsSeverityEnumToProto(o.Severity)) p.SetReason(RunAlphaJobConditionsReasonEnumToProto(o.Reason)) - p.SetInternalReason(RunAlphaJobConditionsInternalReasonEnumToProto(o.InternalReason)) - p.SetDomainMappingReason(RunAlphaJobConditionsDomainMappingReasonEnumToProto(o.DomainMappingReason)) p.SetRevisionReason(RunAlphaJobConditionsRevisionReasonEnumToProto(o.RevisionReason)) p.SetExecutionReason(RunAlphaJobConditionsExecutionReasonEnumToProto(o.ExecutionReason)) return p @@ -1028,17 +963,6 @@ func RunAlphaJobLatestCreatedExecutionToProto(o *alpha.JobLatestCreatedExecution return p } -// JobContainerStatusesToProto converts a JobContainerStatuses object to its proto representation. -func RunAlphaJobContainerStatusesToProto(o *alpha.JobContainerStatuses) *alphapb.RunAlphaJobContainerStatuses { - if o == nil { - return nil - } - p := &alphapb.RunAlphaJobContainerStatuses{} - p.SetName(dcl.ValueOrEmptyString(o.Name)) - p.SetImageDigest(dcl.ValueOrEmptyString(o.ImageDigest)) - return p -} - // JobToProto converts a Job resource to its proto representation. func JobToProto(resource *alpha.Job) *alphapb.RunAlphaJob { p := &alphapb.RunAlphaJob{} @@ -1080,11 +1004,6 @@ func JobToProto(resource *alpha.Job) *alphapb.RunAlphaJob { sConditions[i] = RunAlphaJobConditionsToProto(&r) } p.SetConditions(sConditions) - sContainerStatuses := make([]*alphapb.RunAlphaJobContainerStatuses, len(resource.ContainerStatuses)) - for i, r := range resource.ContainerStatuses { - sContainerStatuses[i] = RunAlphaJobContainerStatusesToProto(&r) - } - p.SetContainerStatuses(sContainerStatuses) return p } diff --git a/services/google/run/alpha/job.go b/services/google/run/alpha/job.go index 35d11c5f8..d7e107d71 100755 --- a/services/google/run/alpha/job.go +++ b/services/google/run/alpha/job.go @@ -49,7 +49,6 @@ type Job struct { LatestSucceededExecution *JobLatestSucceededExecution `json:"latestSucceededExecution"` LatestCreatedExecution *JobLatestCreatedExecution `json:"latestCreatedExecution"` Reconciling *bool `json:"reconciling"` - ContainerStatuses []JobContainerStatuses `json:"containerStatuses"` Etag *string `json:"etag"` Project *string `json:"project"` Location *string `json:"location"` @@ -209,7 +208,7 @@ func (v JobTerminalConditionReasonEnum) Validate() error { // Empty enum is okay. return nil } - for _, s := range []string{"COMMON_REASON_UNDEFINED", "UNKNOWN", "ROUTE_MISSING", "REVISION_FAILED", "PROGRESS_DEADLINE_EXCEEDED", "BUILD_STEP_FAILED", "CONTAINER_MISSING", "CONTAINER_PERMISSION_DENIED", "CONTAINER_IMAGE_UNAUTHORIZED", "CONTAINER_IMAGE_AUTHORIZATION_CHECK_FAILED", "ENCRYPTION_KEY_PERMISSION_DENIED", "ENCRYPTION_KEY_CHECK_FAILED", "SECRETS_ACCESS_CHECK_FAILED", "WAITING_FOR_OPERATION", "IMMEDIATE_RETRY", "POSTPONED_RETRY"} { + for _, s := range []string{"COMMON_REASON_UNDEFINED", "UNKNOWN", "ROUTE_MISSING", "REVISION_FAILED", "PROGRESS_DEADLINE_EXCEEDED", "CONTAINER_MISSING", "CONTAINER_PERMISSION_DENIED", "CONTAINER_IMAGE_UNAUTHORIZED", "CONTAINER_IMAGE_AUTHORIZATION_CHECK_FAILED", "ENCRYPTION_KEY_PERMISSION_DENIED", "ENCRYPTION_KEY_CHECK_FAILED", "SECRETS_ACCESS_CHECK_FAILED", "WAITING_FOR_OPERATION", "IMMEDIATE_RETRY", "POSTPONED_RETRY"} { if string(v) == s { return nil } @@ -398,7 +397,7 @@ func (v JobConditionsReasonEnum) Validate() error { // Empty enum is okay. return nil } - for _, s := range []string{"COMMON_REASON_UNDEFINED", "UNKNOWN", "ROUTE_MISSING", "REVISION_FAILED", "PROGRESS_DEADLINE_EXCEEDED", "BUILD_STEP_FAILED", "CONTAINER_MISSING", "CONTAINER_PERMISSION_DENIED", "CONTAINER_IMAGE_UNAUTHORIZED", "CONTAINER_IMAGE_AUTHORIZATION_CHECK_FAILED", "ENCRYPTION_KEY_PERMISSION_DENIED", "ENCRYPTION_KEY_CHECK_FAILED", "SECRETS_ACCESS_CHECK_FAILED", "WAITING_FOR_OPERATION", "IMMEDIATE_RETRY", "POSTPONED_RETRY"} { + for _, s := range []string{"COMMON_REASON_UNDEFINED", "UNKNOWN", "REVISION_FAILED", "PROGRESS_DEADLINE_EXCEEDED", "BUILD_STEP_FAILED", "CONTAINER_MISSING", "CONTAINER_PERMISSION_DENIED", "CONTAINER_IMAGE_UNAUTHORIZED", "CONTAINER_IMAGE_AUTHORIZATION_CHECK_FAILED", "ENCRYPTION_KEY_PERMISSION_DENIED", "ENCRYPTION_KEY_CHECK_FAILED", "SECRETS_ACCESS_CHECK_FAILED", "WAITING_FOR_OPERATION", "IMMEDIATE_RETRY", "POSTPONED_RETRY"} { if string(v) == s { return nil } @@ -410,60 +409,6 @@ func (v JobConditionsReasonEnum) Validate() error { } } -// The enum JobConditionsInternalReasonEnum. -type JobConditionsInternalReasonEnum string - -// JobConditionsInternalReasonEnumRef returns a *JobConditionsInternalReasonEnum with the value of string s -// If the empty string is provided, nil is returned. -func JobConditionsInternalReasonEnumRef(s string) *JobConditionsInternalReasonEnum { - v := JobConditionsInternalReasonEnum(s) - return &v -} - -func (v JobConditionsInternalReasonEnum) Validate() error { - if string(v) == "" { - // Empty enum is okay. - return nil - } - for _, s := range []string{"INTERNAL_REASON_UNDEFINED", "CONFLICTING_REVISION_NAME", "REVISION_MISSING", "CONFIGURATION_MISSING", "ASSIGNING_TRAFFIC", "UPDATING_INGRESS_TRAFFIC_ALLOWED", "REVISION_ORG_POLICY_VIOLATION", "ENABLING_GCFV2_URI_SUPPORT"} { - if string(v) == s { - return nil - } - } - return &dcl.EnumInvalidError{ - Enum: "JobConditionsInternalReasonEnum", - Value: string(v), - Valid: []string{}, - } -} - -// The enum JobConditionsDomainMappingReasonEnum. -type JobConditionsDomainMappingReasonEnum string - -// JobConditionsDomainMappingReasonEnumRef returns a *JobConditionsDomainMappingReasonEnum with the value of string s -// If the empty string is provided, nil is returned. -func JobConditionsDomainMappingReasonEnumRef(s string) *JobConditionsDomainMappingReasonEnum { - v := JobConditionsDomainMappingReasonEnum(s) - return &v -} - -func (v JobConditionsDomainMappingReasonEnum) Validate() error { - if string(v) == "" { - // Empty enum is okay. - return nil - } - for _, s := range []string{"DOMAIN_MAPPING_REASON_UNDEFINED", "ROUTE_NOT_READY", "PERMISSION_DENIED", "CERTIFICATE_ALREADY_EXISTS", "MAPPING_ALREADY_EXISTS", "CERTIFICATE_PENDING", "CERTIFICATE_FAILED"} { - if string(v) == s { - return nil - } - } - return &dcl.EnumInvalidError{ - Enum: "JobConditionsDomainMappingReasonEnum", - Value: string(v), - Valid: []string{}, - } -} - // The enum JobConditionsRevisionReasonEnum. type JobConditionsRevisionReasonEnum string @@ -1378,17 +1323,15 @@ func (r *JobTerminalCondition) HashCode() string { } type JobConditions struct { - empty bool `json:"-"` - Type *string `json:"type"` - State *JobConditionsStateEnum `json:"state"` - Message *string `json:"message"` - LastTransitionTime *string `json:"lastTransitionTime"` - Severity *JobConditionsSeverityEnum `json:"severity"` - Reason *JobConditionsReasonEnum `json:"reason"` - InternalReason *JobConditionsInternalReasonEnum `json:"internalReason"` - DomainMappingReason *JobConditionsDomainMappingReasonEnum `json:"domainMappingReason"` - RevisionReason *JobConditionsRevisionReasonEnum `json:"revisionReason"` - ExecutionReason *JobConditionsExecutionReasonEnum `json:"executionReason"` + empty bool `json:"-"` + Type *string `json:"type"` + State *JobConditionsStateEnum `json:"state"` + Message *string `json:"message"` + LastTransitionTime *string `json:"lastTransitionTime"` + Severity *JobConditionsSeverityEnum `json:"severity"` + Reason *JobConditionsReasonEnum `json:"reason"` + RevisionReason *JobConditionsRevisionReasonEnum `json:"revisionReason"` + ExecutionReason *JobConditionsExecutionReasonEnum `json:"executionReason"` } type jsonJobConditions JobConditions @@ -1418,10 +1361,6 @@ func (r *JobConditions) UnmarshalJSON(data []byte) error { r.Reason = res.Reason - r.InternalReason = res.InternalReason - - r.DomainMappingReason = res.DomainMappingReason - r.RevisionReason = res.RevisionReason r.ExecutionReason = res.ExecutionReason @@ -1548,55 +1487,6 @@ func (r *JobLatestCreatedExecution) HashCode() string { return fmt.Sprintf("%x", hash) } -type JobContainerStatuses struct { - empty bool `json:"-"` - Name *string `json:"name"` - ImageDigest *string `json:"imageDigest"` -} - -type jsonJobContainerStatuses JobContainerStatuses - -func (r *JobContainerStatuses) UnmarshalJSON(data []byte) error { - var res jsonJobContainerStatuses - if err := json.Unmarshal(data, &res); err != nil { - return err - } - - var m map[string]interface{} - json.Unmarshal(data, &m) - - if len(m) == 0 { - *r = *EmptyJobContainerStatuses - } else { - - r.Name = res.Name - - r.ImageDigest = res.ImageDigest - - } - return nil -} - -// This object is used to assert a desired state where this JobContainerStatuses is -// empty. Go lacks global const objects, but this object should be treated -// as one. Modifying this object will have undesirable results. -var EmptyJobContainerStatuses *JobContainerStatuses = &JobContainerStatuses{empty: true} - -func (r *JobContainerStatuses) Empty() bool { - return r.empty -} - -func (r *JobContainerStatuses) String() string { - return dcl.SprintResource(r) -} - -func (r *JobContainerStatuses) HashCode() string { - // Placeholder for a more complex hash method that handles ordering, etc - // Hash resource body for easy comparison later - hash := sha256.New().Sum([]byte(r.String())) - return fmt.Sprintf("%x", hash) -} - // Describe returns a simple description of this resource to ensure that automated tools // can identify it. func (r *Job) Describe() dcl.ServiceTypeVersion { @@ -1636,7 +1526,6 @@ func (r *Job) ID() (string, error) { "latestSucceededExecution": dcl.ValueOrEmptyString(nr.LatestSucceededExecution), "latestCreatedExecution": dcl.ValueOrEmptyString(nr.LatestCreatedExecution), "reconciling": dcl.ValueOrEmptyString(nr.Reconciling), - "containerStatuses": dcl.ValueOrEmptyString(nr.ContainerStatuses), "etag": dcl.ValueOrEmptyString(nr.Etag), "project": dcl.ValueOrEmptyString(nr.Project), "location": dcl.ValueOrEmptyString(nr.Location), diff --git a/services/google/run/alpha/job.yaml b/services/google/run/alpha/job.yaml index 58a254672..60fb92ae0 100755 --- a/services/google/run/alpha/job.yaml +++ b/services/google/run/alpha/job.yaml @@ -121,27 +121,6 @@ components: type: object x-dcl-go-type: JobConditions properties: - domainMappingReason: - type: string - x-dcl-go-name: DomainMappingReason - x-dcl-go-type: JobConditionsDomainMappingReasonEnum - description: 'A reason for the domain mapping condition. Possible - values: DOMAIN_MAPPING_REASON_UNDEFINED, ROUTE_NOT_READY, PERMISSION_DENIED, - CERTIFICATE_ALREADY_EXISTS, MAPPING_ALREADY_EXISTS, CERTIFICATE_PENDING, - CERTIFICATE_FAILED' - x-dcl-conflicts: - - reason - - internalReason - - revisionReason - - executionReason - enum: - - DOMAIN_MAPPING_REASON_UNDEFINED - - ROUTE_NOT_READY - - PERMISSION_DENIED - - CERTIFICATE_ALREADY_EXISTS - - MAPPING_ALREADY_EXISTS - - CERTIFICATE_PENDING - - CERTIFICATE_FAILED executionReason: type: string x-dcl-go-name: ExecutionReason @@ -150,35 +129,11 @@ components: EXECUTION_REASON_UNDEFINED, JOB_STATUS_SERVICE_POLLING_ERROR, NON_ZERO_EXIT_CODE' x-dcl-conflicts: - reason - - internalReason - - domainMappingReason - revisionReason enum: - EXECUTION_REASON_UNDEFINED - JOB_STATUS_SERVICE_POLLING_ERROR - NON_ZERO_EXIT_CODE - internalReason: - type: string - x-dcl-go-name: InternalReason - x-dcl-go-type: JobConditionsInternalReasonEnum - description: 'A reason for the internal condition. Possible values: - INTERNAL_REASON_UNDEFINED, CONFLICTING_REVISION_NAME, REVISION_MISSING, - CONFIGURATION_MISSING, ASSIGNING_TRAFFIC, UPDATING_INGRESS_TRAFFIC_ALLOWED, - REVISION_ORG_POLICY_VIOLATION, ENABLING_GCFV2_URI_SUPPORT' - x-dcl-conflicts: - - reason - - domainMappingReason - - revisionReason - - executionReason - enum: - - INTERNAL_REASON_UNDEFINED - - CONFLICTING_REVISION_NAME - - REVISION_MISSING - - CONFIGURATION_MISSING - - ASSIGNING_TRAFFIC - - UPDATING_INGRESS_TRAFFIC_ALLOWED - - REVISION_ORG_POLICY_VIOLATION - - ENABLING_GCFV2_URI_SUPPORT lastTransitionTime: type: string format: date-time @@ -195,21 +150,17 @@ components: x-dcl-go-name: Reason x-dcl-go-type: JobConditionsReasonEnum description: 'A common (service-level) reason for this condition. - Possible values: COMMON_REASON_UNDEFINED, UNKNOWN, ROUTE_MISSING, - REVISION_FAILED, PROGRESS_DEADLINE_EXCEEDED, BUILD_STEP_FAILED, - CONTAINER_MISSING, CONTAINER_PERMISSION_DENIED, CONTAINER_IMAGE_UNAUTHORIZED, - CONTAINER_IMAGE_AUTHORIZATION_CHECK_FAILED, ENCRYPTION_KEY_PERMISSION_DENIED, - ENCRYPTION_KEY_CHECK_FAILED, SECRETS_ACCESS_CHECK_FAILED, WAITING_FOR_OPERATION, - IMMEDIATE_RETRY, POSTPONED_RETRY' + Possible values: COMMON_REASON_UNDEFINED, UNKNOWN, REVISION_FAILED, + PROGRESS_DEADLINE_EXCEEDED, BUILD_STEP_FAILED, CONTAINER_MISSING, + CONTAINER_PERMISSION_DENIED, CONTAINER_IMAGE_UNAUTHORIZED, CONTAINER_IMAGE_AUTHORIZATION_CHECK_FAILED, + ENCRYPTION_KEY_PERMISSION_DENIED, ENCRYPTION_KEY_CHECK_FAILED, SECRETS_ACCESS_CHECK_FAILED, + WAITING_FOR_OPERATION, IMMEDIATE_RETRY, POSTPONED_RETRY' x-dcl-conflicts: - - internalReason - - domainMappingReason - revisionReason - executionReason enum: - COMMON_REASON_UNDEFINED - UNKNOWN - - ROUTE_MISSING - REVISION_FAILED - PROGRESS_DEADLINE_EXCEEDED - BUILD_STEP_FAILED @@ -234,8 +185,6 @@ components: HEALTH_CHECK_SKIPPED' x-dcl-conflicts: - reason - - internalReason - - domainMappingReason - executionReason enum: - REVISION_REASON_UNDEFINED @@ -281,28 +230,6 @@ components: process. See also: https://github.com/knative/serving/blob/main/docs/spec/errors.md#error-conditions-and-reporting Types common to all resources include: * "Ready": True when the Resource is ready.' - containerStatuses: - type: array - x-dcl-go-name: ContainerStatuses - readOnly: true - description: Output only. Status information for each of the containers - specified. - x-kubernetes-immutable: true - x-dcl-list-type: list - items: - type: object - x-dcl-go-type: JobContainerStatuses - properties: - imageDigest: - type: string - x-dcl-go-name: ImageDigest - description: ImageDigest holds the resolved digest for the image specified, - regardless of whether a tag or digest was originally specified in - the Container object. - name: - type: string - x-dcl-go-name: Name - description: The name of the container, if specified. createTime: type: string format: date-time @@ -1002,8 +929,8 @@ components: x-dcl-go-type: JobTerminalConditionReasonEnum description: 'A common (service-level) reason for this condition. Possible values: COMMON_REASON_UNDEFINED, UNKNOWN, ROUTE_MISSING, REVISION_FAILED, - PROGRESS_DEADLINE_EXCEEDED, BUILD_STEP_FAILED, CONTAINER_MISSING, - CONTAINER_PERMISSION_DENIED, CONTAINER_IMAGE_UNAUTHORIZED, CONTAINER_IMAGE_AUTHORIZATION_CHECK_FAILED, + PROGRESS_DEADLINE_EXCEEDED, CONTAINER_MISSING, CONTAINER_PERMISSION_DENIED, + CONTAINER_IMAGE_UNAUTHORIZED, CONTAINER_IMAGE_AUTHORIZATION_CHECK_FAILED, ENCRYPTION_KEY_PERMISSION_DENIED, ENCRYPTION_KEY_CHECK_FAILED, SECRETS_ACCESS_CHECK_FAILED, WAITING_FOR_OPERATION, IMMEDIATE_RETRY, POSTPONED_RETRY' x-dcl-conflicts: @@ -1017,7 +944,6 @@ components: - ROUTE_MISSING - REVISION_FAILED - PROGRESS_DEADLINE_EXCEEDED - - BUILD_STEP_FAILED - CONTAINER_MISSING - CONTAINER_PERMISSION_DENIED - CONTAINER_IMAGE_UNAUTHORIZED diff --git a/services/google/run/alpha/job_alpha_yaml_embed.go b/services/google/run/alpha/job_alpha_yaml_embed.go index 50abca3d9..4c38d2b0e 100755 --- a/services/google/run/alpha/job_alpha_yaml_embed.go +++ b/services/google/run/alpha/job_alpha_yaml_embed.go @@ -17,7 +17,7 @@ package alpha // blaze-out/k8-fastbuild/genfiles/cloud/graphite/mmv2/services/google/run/alpha/job.yaml -var YAML_job = []byte("info:\n title: Run/Job\n description: The Run Job resource\n x-dcl-struct-name: Job\n x-dcl-has-iam: true\npaths:\n get:\n description: The function used to get information about a Job\n parameters:\n - name: Job\n required: true\n description: A full instance of a Job\n apply:\n description: The function used to apply information about a Job\n parameters:\n - name: Job\n required: true\n description: A full instance of a Job\n delete:\n description: The function used to delete a Job\n parameters:\n - name: Job\n required: true\n description: A full instance of a Job\n deleteAll:\n description: The function used to delete all Job\n parameters:\n - name: project\n required: true\n schema:\n type: string\n - name: location\n required: true\n schema:\n type: string\n list:\n description: The function used to list information about many Job\n parameters:\n - name: project\n required: true\n schema:\n type: string\n - name: location\n required: true\n schema:\n type: string\ncomponents:\n schemas:\n Job:\n title: Job\n x-dcl-id: projects/{{project}}/locations/{{location}}/jobs/{{name}}\n x-dcl-parent-container: project\n x-dcl-has-iam: true\n type: object\n required:\n - name\n - template\n - project\n - location\n properties:\n annotations:\n type: object\n additionalProperties:\n type: string\n x-dcl-go-name: Annotations\n description: 'KRM-style annotations for the resource. Unstructured key value\n map that may be set by external tools to store and arbitrary metadata.\n They are not queryable and should be preserved when modifying objects.\n Cloud Run will populate some annotations using ''run.googleapis.com''\n or ''serving.knative.dev'' namespaces. This field follows Kubernetes annotations''\n namespacing, limits, and rules. More info: https://kubernetes.io/docs/user-guide/annotations'\n binaryAuthorization:\n type: object\n x-dcl-go-name: BinaryAuthorization\n x-dcl-go-type: JobBinaryAuthorization\n description: Settings for the Binary Authorization feature.\n properties:\n breakglassJustification:\n type: string\n x-dcl-go-name: BreakglassJustification\n description: If present, indicates to use Breakglass using this justification.\n If use_default is False, then it must be empty. For more information\n on breakglass, see https://cloud.google.com/binary-authorization/docs/using-breakglass\n useDefault:\n type: boolean\n x-dcl-go-name: UseDefault\n description: If True, indicates to use the default project's binary\n authorization policy. If False, binary authorization will be disabled.\n client:\n type: string\n x-dcl-go-name: Client\n description: Arbitrary identifier for the API client.\n clientVersion:\n type: string\n x-dcl-go-name: ClientVersion\n description: Arbitrary version identifier for the API client.\n conditions:\n type: array\n x-dcl-go-name: Conditions\n readOnly: true\n description: Output only. The Conditions of all other associated sub-resources.\n They contain additional diagnostics information in case the Job does not\n reach its desired state. See comments in `reconciling` for additional\n information on reconciliation process in Cloud Run.\n x-kubernetes-immutable: true\n x-dcl-list-type: list\n items:\n type: object\n x-dcl-go-type: JobConditions\n properties:\n domainMappingReason:\n type: string\n x-dcl-go-name: DomainMappingReason\n x-dcl-go-type: JobConditionsDomainMappingReasonEnum\n description: 'A reason for the domain mapping condition. Possible\n values: DOMAIN_MAPPING_REASON_UNDEFINED, ROUTE_NOT_READY, PERMISSION_DENIED,\n CERTIFICATE_ALREADY_EXISTS, MAPPING_ALREADY_EXISTS, CERTIFICATE_PENDING,\n CERTIFICATE_FAILED'\n x-dcl-conflicts:\n - reason\n - internalReason\n - revisionReason\n - executionReason\n enum:\n - DOMAIN_MAPPING_REASON_UNDEFINED\n - ROUTE_NOT_READY\n - PERMISSION_DENIED\n - CERTIFICATE_ALREADY_EXISTS\n - MAPPING_ALREADY_EXISTS\n - CERTIFICATE_PENDING\n - CERTIFICATE_FAILED\n executionReason:\n type: string\n x-dcl-go-name: ExecutionReason\n x-dcl-go-type: JobConditionsExecutionReasonEnum\n description: 'A reason for the execution condition. Possible values:\n EXECUTION_REASON_UNDEFINED, JOB_STATUS_SERVICE_POLLING_ERROR, NON_ZERO_EXIT_CODE'\n x-dcl-conflicts:\n - reason\n - internalReason\n - domainMappingReason\n - revisionReason\n enum:\n - EXECUTION_REASON_UNDEFINED\n - JOB_STATUS_SERVICE_POLLING_ERROR\n - NON_ZERO_EXIT_CODE\n internalReason:\n type: string\n x-dcl-go-name: InternalReason\n x-dcl-go-type: JobConditionsInternalReasonEnum\n description: 'A reason for the internal condition. Possible values:\n INTERNAL_REASON_UNDEFINED, CONFLICTING_REVISION_NAME, REVISION_MISSING,\n CONFIGURATION_MISSING, ASSIGNING_TRAFFIC, UPDATING_INGRESS_TRAFFIC_ALLOWED,\n REVISION_ORG_POLICY_VIOLATION, ENABLING_GCFV2_URI_SUPPORT'\n x-dcl-conflicts:\n - reason\n - domainMappingReason\n - revisionReason\n - executionReason\n enum:\n - INTERNAL_REASON_UNDEFINED\n - CONFLICTING_REVISION_NAME\n - REVISION_MISSING\n - CONFIGURATION_MISSING\n - ASSIGNING_TRAFFIC\n - UPDATING_INGRESS_TRAFFIC_ALLOWED\n - REVISION_ORG_POLICY_VIOLATION\n - ENABLING_GCFV2_URI_SUPPORT\n lastTransitionTime:\n type: string\n format: date-time\n x-dcl-go-name: LastTransitionTime\n description: Last time the condition transitioned from one status\n to another.\n message:\n type: string\n x-dcl-go-name: Message\n description: Human readable message indicating details about the current\n status.\n reason:\n type: string\n x-dcl-go-name: Reason\n x-dcl-go-type: JobConditionsReasonEnum\n description: 'A common (service-level) reason for this condition.\n Possible values: COMMON_REASON_UNDEFINED, UNKNOWN, ROUTE_MISSING,\n REVISION_FAILED, PROGRESS_DEADLINE_EXCEEDED, BUILD_STEP_FAILED,\n CONTAINER_MISSING, CONTAINER_PERMISSION_DENIED, CONTAINER_IMAGE_UNAUTHORIZED,\n CONTAINER_IMAGE_AUTHORIZATION_CHECK_FAILED, ENCRYPTION_KEY_PERMISSION_DENIED,\n ENCRYPTION_KEY_CHECK_FAILED, SECRETS_ACCESS_CHECK_FAILED, WAITING_FOR_OPERATION,\n IMMEDIATE_RETRY, POSTPONED_RETRY'\n x-dcl-conflicts:\n - internalReason\n - domainMappingReason\n - revisionReason\n - executionReason\n enum:\n - COMMON_REASON_UNDEFINED\n - UNKNOWN\n - ROUTE_MISSING\n - REVISION_FAILED\n - PROGRESS_DEADLINE_EXCEEDED\n - BUILD_STEP_FAILED\n - CONTAINER_MISSING\n - CONTAINER_PERMISSION_DENIED\n - CONTAINER_IMAGE_UNAUTHORIZED\n - CONTAINER_IMAGE_AUTHORIZATION_CHECK_FAILED\n - ENCRYPTION_KEY_PERMISSION_DENIED\n - ENCRYPTION_KEY_CHECK_FAILED\n - SECRETS_ACCESS_CHECK_FAILED\n - WAITING_FOR_OPERATION\n - IMMEDIATE_RETRY\n - POSTPONED_RETRY\n revisionReason:\n type: string\n x-dcl-go-name: RevisionReason\n x-dcl-go-type: JobConditionsRevisionReasonEnum\n description: 'A reason for the revision condition. Possible values:\n REVISION_REASON_UNDEFINED, PENDING, RESERVE, RETIRED, RETIRING,\n RECREATING, HEALTH_CHECK_CONTAINER_ERROR, CUSTOMIZED_PATH_RESPONSE_PENDING,\n MIN_INSTANCES_NOT_PROVISIONED, ACTIVE_REVISION_LIMIT_REACHED, NO_DEPLOYMENT,\n HEALTH_CHECK_SKIPPED'\n x-dcl-conflicts:\n - reason\n - internalReason\n - domainMappingReason\n - executionReason\n enum:\n - REVISION_REASON_UNDEFINED\n - PENDING\n - RESERVE\n - RETIRED\n - RETIRING\n - RECREATING\n - HEALTH_CHECK_CONTAINER_ERROR\n - CUSTOMIZED_PATH_RESPONSE_PENDING\n - MIN_INSTANCES_NOT_PROVISIONED\n - ACTIVE_REVISION_LIMIT_REACHED\n - NO_DEPLOYMENT\n - HEALTH_CHECK_SKIPPED\n severity:\n type: string\n x-dcl-go-name: Severity\n x-dcl-go-type: JobConditionsSeverityEnum\n description: 'How to interpret failures of this condition, one of\n Error, Warning, Info Possible values: SEVERITY_UNSPECIFIED, ERROR,\n WARNING, INFO'\n enum:\n - SEVERITY_UNSPECIFIED\n - ERROR\n - WARNING\n - INFO\n state:\n type: string\n x-dcl-go-name: State\n x-dcl-go-type: JobConditionsStateEnum\n description: 'State of the condition. Possible values: STATE_UNSPECIFIED,\n CONDITION_PENDING, CONDITION_RECONCILING, CONDITION_FAILED, CONDITION_SUCCEEDED'\n enum:\n - STATE_UNSPECIFIED\n - CONDITION_PENDING\n - CONDITION_RECONCILING\n - CONDITION_FAILED\n - CONDITION_SUCCEEDED\n type:\n type: string\n x-dcl-go-name: Type\n description: 'type is used to communicate the status of the reconciliation\n process. See also: https://github.com/knative/serving/blob/main/docs/spec/errors.md#error-conditions-and-reporting\n Types common to all resources include: * \"Ready\": True when the\n Resource is ready.'\n containerStatuses:\n type: array\n x-dcl-go-name: ContainerStatuses\n readOnly: true\n description: Output only. Status information for each of the containers\n specified.\n x-kubernetes-immutable: true\n x-dcl-list-type: list\n items:\n type: object\n x-dcl-go-type: JobContainerStatuses\n properties:\n imageDigest:\n type: string\n x-dcl-go-name: ImageDigest\n description: ImageDigest holds the resolved digest for the image specified,\n regardless of whether a tag or digest was originally specified in\n the Container object.\n name:\n type: string\n x-dcl-go-name: Name\n description: The name of the container, if specified.\n createTime:\n type: string\n format: date-time\n x-dcl-go-name: CreateTime\n readOnly: true\n description: Output only. The creation time.\n x-kubernetes-immutable: true\n creator:\n type: string\n x-dcl-go-name: Creator\n readOnly: true\n description: Output only. Email address of the authenticated creator.\n x-kubernetes-immutable: true\n deleteTime:\n type: string\n format: date-time\n x-dcl-go-name: DeleteTime\n readOnly: true\n description: Output only. The deletion time.\n x-kubernetes-immutable: true\n etag:\n type: string\n x-dcl-go-name: Etag\n readOnly: true\n description: Output only. A system-generated fingerprint for this version\n of the resource. May be used to detect modification conflict during updates.\n x-kubernetes-immutable: true\n executionCount:\n type: integer\n format: int64\n x-dcl-go-name: ExecutionCount\n readOnly: true\n description: Output only. Number of executions created for this job.\n x-kubernetes-immutable: true\n expireTime:\n type: string\n format: date-time\n x-dcl-go-name: ExpireTime\n readOnly: true\n description: Output only. For a deleted resource, the time after which it\n will be permamently deleted.\n x-kubernetes-immutable: true\n generation:\n type: integer\n format: int64\n x-dcl-go-name: Generation\n readOnly: true\n description: Output only. A number that monotonically increases every time\n the user modifies the desired state.\n x-kubernetes-immutable: true\n labels:\n type: object\n additionalProperties:\n type: string\n x-dcl-go-name: Labels\n readOnly: true\n description: KRM-style labels for the resource. User-provided labels are\n shared with Google's billing system, so they can be used to filter, or\n break down billing charges by team, component, environment, state, etc.\n For more information, visit https://cloud.google.com/resource-manager/docs/creating-managing-labels\n or https://cloud.google.com/run/docs/configuring/labels Cloud Run will\n populate some labels with 'run.googleapis.com' or 'serving.knative.dev'\n namespaces. Those labels are read-only, and user changes will not be preserved.\n x-kubernetes-immutable: true\n lastModifier:\n type: string\n x-dcl-go-name: LastModifier\n readOnly: true\n description: Output only. Email address of the last authenticated modifier.\n x-kubernetes-immutable: true\n latestCreatedExecution:\n type: object\n x-dcl-go-name: LatestCreatedExecution\n x-dcl-go-type: JobLatestCreatedExecution\n readOnly: true\n description: Output only. Name of the last created execution.\n properties:\n createTime:\n type: string\n format: date-time\n x-dcl-go-name: CreateTime\n description: Creation timestamp of the execution.\n name:\n type: string\n x-dcl-go-name: Name\n description: Name of the execution.\n x-dcl-references:\n - resource: Run/Execution\n field: selfLink\n parent: true\n latestSucceededExecution:\n type: object\n x-dcl-go-name: LatestSucceededExecution\n x-dcl-go-type: JobLatestSucceededExecution\n readOnly: true\n description: Output only. Name of the last succeeded execution.\n properties:\n createTime:\n type: string\n format: date-time\n x-dcl-go-name: CreateTime\n description: Creation timestamp of the execution.\n name:\n type: string\n x-dcl-go-name: Name\n description: Name of the execution.\n x-dcl-references:\n - resource: Run/Execution\n field: selfLink\n parent: true\n launchStage:\n type: string\n x-dcl-go-name: LaunchStage\n x-dcl-go-type: JobLaunchStageEnum\n description: 'The launch stage as defined by [Google Cloud Platform Launch\n Stages](https://cloud.google.com/terms/launch-stages). Cloud Run supports\n `ALPHA`, `BETA`, and `GA`. If no value is specified, GA is assumed. Possible\n values: LAUNCH_STAGE_UNSPECIFIED, UNIMPLEMENTED, PRELAUNCH, EARLY_ACCESS,\n ALPHA, BETA, GA, DEPRECATED'\n enum:\n - LAUNCH_STAGE_UNSPECIFIED\n - UNIMPLEMENTED\n - PRELAUNCH\n - EARLY_ACCESS\n - ALPHA\n - BETA\n - GA\n - DEPRECATED\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 fully qualified name of this Job. Format: projects/{project}/locations/{location}/jobs/{job}'\n observedGeneration:\n type: integer\n format: int64\n x-dcl-go-name: ObservedGeneration\n readOnly: true\n description: Output only. The generation of this Job. See comments in `reconciling`\n for additional information on reconciliation process in Cloud Run.\n x-kubernetes-immutable: true\n project:\n type: string\n x-dcl-go-name: Project\n description: The project for the resource\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Cloudresourcemanager/Project\n field: name\n parent: true\n reconciling:\n type: boolean\n x-dcl-go-name: Reconciling\n readOnly: true\n description: 'Output only. Returns true if the Job is currently being acted\n upon by the system to bring it into the desired state. When a new Job\n is created, or an existing one is updated, Cloud Run will asynchronously\n perform all necessary steps to bring the Job to the desired state. This\n process is called reconciliation. While reconciliation is in process,\n `observed_generation` and `latest_succeeded_execution`, will have transient\n values that might mismatch the intended state: Once reconciliation is\n over (and this field is false), there are two possible outcomes: reconciliation\n succeeded and the state matches the Job, or there was an error, and reconciliation\n failed. This state can be found in `terminal_condition.state`. If reconciliation\n succeeded, the following fields will match: `observed_generation` and\n `generation`, `latest_succeeded_execution` and `latest_created_execution`.\n If reconciliation failed, `observed_generation` and `latest_succeeded_execution`\n will have the state of the last succeeded execution or empty for newly\n created Job. Additional information on the failure can be found in `terminal_condition`\n and `conditions`.'\n x-kubernetes-immutable: true\n template:\n type: object\n x-dcl-go-name: Template\n x-dcl-go-type: JobTemplate\n description: Required. The template used to create executions for this Job.\n required:\n - template\n properties:\n annotations:\n type: object\n additionalProperties:\n type: string\n x-dcl-go-name: Annotations\n description: KRM-style annotations for the resource.\n labels:\n type: object\n additionalProperties:\n type: string\n x-dcl-go-name: Labels\n description: KRM-style labels for the resource.\n parallelism:\n type: integer\n format: int64\n x-dcl-go-name: Parallelism\n description: 'Specifies the maximum desired number of tasks the execution\n should run at any given time. Must be <= task_count. The actual number\n of tasks running in steady state will be less than this number when\n ((.spec.task_count - .status.successful) < .spec.parallelism), i.e.\n when the work left to do is less than max parallelism. More info:\n https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/'\n x-dcl-server-default: true\n taskCount:\n type: integer\n format: int64\n x-dcl-go-name: TaskCount\n description: 'Specifies the desired number of tasks the execution should\n run. Setting to 1 means that parallelism is limited to 1 and the success\n of that task signals the success of the execution. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/'\n x-dcl-server-default: true\n template:\n type: object\n x-dcl-go-name: Template\n x-dcl-go-type: JobTemplateTemplate\n description: Required. Describes the task(s) that will be created when\n executing an execution.\n properties:\n containers:\n type: array\n x-dcl-go-name: Containers\n description: Holds the single container that defines the unit of\n execution for this task.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: object\n x-dcl-go-type: JobTemplateTemplateContainers\n required:\n - image\n properties:\n args:\n type: array\n x-dcl-go-name: Args\n description: 'Arguments to the entrypoint. The docker image''s\n CMD is used if this is not provided. Variable references\n $(VAR_NAME) are expanded using the container''s environment.\n If a variable cannot be resolved, the reference in the input\n string will be unchanged. The $(VAR_NAME) syntax can be\n escaped with a double $$, ie: $$(VAR_NAME). Escaped references\n will never be expanded, regardless of whether the variable\n exists or not. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell'\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: string\n command:\n type: array\n x-dcl-go-name: Command\n description: 'Entrypoint array. Not executed within a shell.\n The docker image''s ENTRYPOINT is used if this is not provided.\n Variable references $(VAR_NAME) are expanded using the container''s\n environment. If a variable cannot be resolved, the reference\n in the input string will be unchanged. The $(VAR_NAME) syntax\n can be escaped with a double $$, ie: $$(VAR_NAME). Escaped\n references will never be expanded, regardless of whether\n the variable exists or not. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell'\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: string\n env:\n type: array\n x-dcl-go-name: Env\n description: List of environment variables to set in the container.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: object\n x-dcl-go-type: JobTemplateTemplateContainersEnv\n required:\n - name\n properties:\n name:\n type: string\n x-dcl-go-name: Name\n description: Required. Name of the environment variable.\n Must be a C_IDENTIFIER, and mnay not exceed 32768\n characters.\n value:\n type: string\n x-dcl-go-name: Value\n description: 'Variable references $(VAR_NAME) are expanded\n using the previous defined environment variables in\n the container and any route environment variables.\n If a variable cannot be resolved, the reference in\n the input string will be unchanged. The $(VAR_NAME)\n syntax can be escaped with a double $$, ie: $$(VAR_NAME).\n Escaped references will never be expanded, regardless\n of whether the variable exists or not. Defaults to\n \"\", and the maximum length is 32768 bytes.'\n x-dcl-conflicts:\n - valueSource\n valueSource:\n type: object\n x-dcl-go-name: ValueSource\n x-dcl-go-type: JobTemplateTemplateContainersEnvValueSource\n description: Source for the environment variable's value.\n x-dcl-conflicts:\n - value\n properties:\n secretKeyRef:\n type: object\n x-dcl-go-name: SecretKeyRef\n x-dcl-go-type: JobTemplateTemplateContainersEnvValueSourceSecretKeyRef\n description: Selects a secret and a specific version\n from Cloud Secret Manager.\n required:\n - secret\n properties:\n secret:\n type: string\n x-dcl-go-name: Secret\n description: 'Required. The name of the secret\n in Cloud Secret Manager. Format: {secret_name}\n if the secret is in the same project. projects/{project}/secrets/{secret_name}\n if the secret is in a different project.'\n x-dcl-references:\n - resource: Secretmanager/Secret\n field: selfLink\n version:\n type: string\n x-dcl-go-name: Version\n description: The Cloud Secret Manager secret\n version. Can be 'latest' for the latest value\n or an integer for a specific version.\n x-dcl-references:\n - resource: Secretmanager/SecretVersion\n field: selfLink\n image:\n type: string\n x-dcl-go-name: Image\n description: 'Required. URL of the Container image in Google\n Container Registry or Docker More info: https://kubernetes.io/docs/concepts/containers/images'\n name:\n type: string\n x-dcl-go-name: Name\n description: Name of the container specified as a DNS_LABEL.\n ports:\n type: array\n x-dcl-go-name: Ports\n description: List of ports to expose from the container. Only\n a single port can be specified. The specified ports must\n be listening on all interfaces (0.0.0.0) within the container\n to be accessible. If omitted, a port number will be chosen\n and passed to the container through the PORT environment\n variable for the container to listen on.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: object\n x-dcl-go-type: JobTemplateTemplateContainersPorts\n properties:\n containerPort:\n type: integer\n format: int64\n x-dcl-go-name: ContainerPort\n description: Port number the container listens on. This\n must be a valid TCP port number, 0 < container_port\n < 65536.\n name:\n type: string\n x-dcl-go-name: Name\n description: If specified, used to specify which protocol\n to use. Allowed values are \"http1\" and \"h2c\".\n resources:\n type: object\n x-dcl-go-name: Resources\n x-dcl-go-type: JobTemplateTemplateContainersResources\n description: 'Compute Resource requirements by this container.\n More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources'\n x-dcl-server-default: true\n properties:\n cpuIdle:\n type: boolean\n x-dcl-go-name: CpuIdle\n description: Determines whether CPU should be throttled\n or not outside of requests.\n x-dcl-server-default: true\n limits:\n type: object\n additionalProperties:\n type: string\n x-dcl-go-name: Limits\n description: 'Only memory and CPU are supported. Note:\n The only supported values for CPU are ''1'', ''2'',\n and ''4''. Setting 4 CPU requires at least 2Gi of memory.\n The values of the map is string form of the ''quantity''\n k8s type: https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go'\n volumeMounts:\n type: array\n x-dcl-go-name: VolumeMounts\n description: Volume to mount into the container's filesystem.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: object\n x-dcl-go-type: JobTemplateTemplateContainersVolumeMounts\n required:\n - name\n - mountPath\n properties:\n mountPath:\n type: string\n x-dcl-go-name: MountPath\n description: Required. Path within the container at\n which the volume should be mounted. Must not contain\n ':'. For Cloud SQL volumes, it can be left empty,\n or must otherwise be `/cloudsql`. All instances defined\n in the Volume will be available as `/cloudsql/[instance]`.\n For more information on Cloud SQL volumes, visit https://cloud.google.com/sql/docs/mysql/connect-run\n name:\n type: string\n x-dcl-go-name: Name\n description: Required. This must match the Name of a\n Volume.\n encryptionKey:\n type: string\n x-dcl-go-name: EncryptionKey\n description: A reference to a customer managed encryption key (CMEK)\n to use to encrypt this container image. For more information,\n go to https://cloud.google.com/run/docs/securing/using-cmek\n x-dcl-references:\n - resource: Cloudkms/CryptoKey\n field: selfLink\n executionEnvironment:\n type: string\n x-dcl-go-name: ExecutionEnvironment\n x-dcl-go-type: JobTemplateTemplateExecutionEnvironmentEnum\n description: 'The execution environment being used to host this\n Task. Possible values: EXECUTION_ENVIRONMENT_UNSPECIFIED, EXECUTION_ENVIRONMENT_DEFAULT,\n EXECUTION_ENVIRONMENT_GEN2'\n enum:\n - EXECUTION_ENVIRONMENT_UNSPECIFIED\n - EXECUTION_ENVIRONMENT_DEFAULT\n - EXECUTION_ENVIRONMENT_GEN2\n maxRetries:\n type: integer\n format: int64\n x-dcl-go-name: MaxRetries\n description: Number of retries allowed per Task, before marking\n this Task failed.\n serviceAccount:\n type: string\n x-dcl-go-name: ServiceAccount\n description: Email address of the IAM service account associated\n with the Task of a Job. The service account represents the identity\n of the running task, and determines what permissions the task\n has. If not provided, the task will use the project's default\n service account.\n x-dcl-server-default: true\n timeout:\n type: string\n x-dcl-go-name: Timeout\n description: Max allowed time duration the Task may be active before\n the system will actively try to mark it failed and kill associated\n containers. This applies per attempt of a task, meaning each retry\n can run for the full timeout.\n x-dcl-server-default: true\n volumes:\n type: array\n x-dcl-go-name: Volumes\n description: A list of Volumes to make available to containers.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: object\n x-dcl-go-type: JobTemplateTemplateVolumes\n required:\n - name\n properties:\n cloudSqlInstance:\n type: object\n x-dcl-go-name: CloudSqlInstance\n x-dcl-go-type: JobTemplateTemplateVolumesCloudSqlInstance\n description: For Cloud SQL volumes, contains the specific\n instances that should be mounted. Visit https://cloud.google.com/sql/docs/mysql/connect-run\n for more information on how to connect Cloud SQL and Cloud\n Run.\n x-dcl-conflicts:\n - secret\n properties:\n connections:\n type: array\n x-dcl-go-name: Connections\n description: 'The Cloud SQL instance connection names,\n as can be found in https://console.cloud.google.com/sql/instances.\n Visit https://cloud.google.com/sql/docs/mysql/connect-run\n for more information on how to connect Cloud SQL and\n Cloud Run. Format: {project}:{location}:{instance}'\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: string\n name:\n type: string\n x-dcl-go-name: Name\n description: Required. Volume's name.\n secret:\n type: object\n x-dcl-go-name: Secret\n x-dcl-go-type: JobTemplateTemplateVolumesSecret\n description: 'Secret represents a secret that should populate\n this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret'\n x-dcl-conflicts:\n - cloudSqlInstance\n required:\n - secret\n properties:\n defaultMode:\n type: integer\n format: int64\n x-dcl-go-name: DefaultMode\n description: 'Integer representation of mode bits to use\n on created files by default. Must be a value between\n 0000 and 0777 (octal), defaulting to 0644. Directories\n within the path are not affected by this setting. Notes\n * Internally, a umask of 0222 will be applied to any\n non-zero value. * This is an integer representation\n of the mode bits. So, the octal integer value should\n look exactly as the chmod numeric notation with a leading\n zero. Some examples: for chmod 777 (a=rwx), set to 0777\n (octal) or 511 (base-10). For chmod 640 (u=rw,g=r),\n set to 0640 (octal) or 416 (base-10). For chmod 755\n (u=rwx,g=rx,o=rx), set to 0755 (octal) or 493 (base-10).\n * This might be in conflict with other options that\n affect the file mode, like fsGroup, and the result can\n be other mode bits set. This might be in conflict with\n other options that affect the file mode, like fsGroup,\n and as a result, other mode bits could be set.'\n items:\n type: array\n x-dcl-go-name: Items\n description: If unspecified, the volume will expose a\n file whose name is the secret, relative to VolumeMount.mount_path.\n If specified, the key will be used as the version to\n fetch from Cloud Secret Manager and the path will be\n the name of the file exposed in the volume. When items\n are defined, they must specify a path and a version.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: object\n x-dcl-go-type: JobTemplateTemplateVolumesSecretItems\n required:\n - path\n properties:\n mode:\n type: integer\n format: int64\n x-dcl-go-name: Mode\n description: 'Integer octal mode bits to use on\n this file, must be a value between 01 and 0777\n (octal). If 0 or not set, the Volume''s default\n mode will be used. Notes * Internally, a umask\n of 0222 will be applied to any non-zero value.\n * This is an integer representation of the mode\n bits. So, the octal integer value should look\n exactly as the chmod numeric notation with a leading\n zero. Some examples: for chmod 777 (a=rwx), set\n to 0777 (octal) or 511 (base-10). For chmod 640\n (u=rw,g=r), set to 0640 (octal) or 416 (base-10).\n For chmod 755 (u=rwx,g=rx,o=rx), set to 0755 (octal)\n or 493 (base-10). * This might be in conflict\n with other options that affect the file mode,\n like fsGroup, and the result can be other mode\n bits set.'\n path:\n type: string\n x-dcl-go-name: Path\n description: Required. The relative path of the\n secret in the container.\n version:\n type: string\n x-dcl-go-name: Version\n description: The Cloud Secret Manager secret version.\n Can be 'latest' for the latest value or an integer\n for a specific version.\n secret:\n type: string\n x-dcl-go-name: Secret\n description: 'Required. The name of the secret in Cloud\n Secret Manager. Format: {secret} if the secret is in\n the same project. projects/{project}/secrets/{secret}\n if the secret is in a different project.'\n vpcAccess:\n type: object\n x-dcl-go-name: VPCAccess\n x-dcl-go-type: JobTemplateTemplateVPCAccess\n description: VPC Access configuration to use for this Task. For\n more information, visit https://cloud.google.com/run/docs/configuring/connecting-vpc.\n properties:\n connector:\n type: string\n x-dcl-go-name: Connector\n description: 'VPC Access connector name. Format: projects/{project}/locations/{location}/connectors/{connector}'\n x-dcl-references:\n - resource: Vpcaccess/Connector\n field: selfLink\n egress:\n type: string\n x-dcl-go-name: Egress\n x-dcl-go-type: JobTemplateTemplateVPCAccessEgressEnum\n description: 'Traffic VPC egress settings. Possible values:\n VPC_EGRESS_UNSPECIFIED, ALL_TRAFFIC, PRIVATE_RANGES_ONLY'\n enum:\n - VPC_EGRESS_UNSPECIFIED\n - ALL_TRAFFIC\n - PRIVATE_RANGES_ONLY\n terminalCondition:\n type: object\n x-dcl-go-name: TerminalCondition\n x-dcl-go-type: JobTerminalCondition\n readOnly: true\n description: Output only. The Condition of this Job, containing its readiness\n status, and detailed error information in case it did not reach the desired\n state.\n properties:\n domainMappingReason:\n type: string\n x-dcl-go-name: DomainMappingReason\n x-dcl-go-type: JobTerminalConditionDomainMappingReasonEnum\n description: 'A reason for the domain mapping condition. Possible values:\n DOMAIN_MAPPING_REASON_UNDEFINED, ROUTE_NOT_READY, PERMISSION_DENIED,\n CERTIFICATE_ALREADY_EXISTS, MAPPING_ALREADY_EXISTS, CERTIFICATE_PENDING,\n CERTIFICATE_FAILED'\n x-dcl-conflicts:\n - reason\n - internalReason\n - revisionReason\n - executionReason\n enum:\n - DOMAIN_MAPPING_REASON_UNDEFINED\n - ROUTE_NOT_READY\n - PERMISSION_DENIED\n - CERTIFICATE_ALREADY_EXISTS\n - MAPPING_ALREADY_EXISTS\n - CERTIFICATE_PENDING\n - CERTIFICATE_FAILED\n executionReason:\n type: string\n x-dcl-go-name: ExecutionReason\n x-dcl-go-type: JobTerminalConditionExecutionReasonEnum\n description: 'A reason for the execution condition. Possible values:\n EXECUTION_REASON_UNDEFINED, JOB_STATUS_SERVICE_POLLING_ERROR, NON_ZERO_EXIT_CODE'\n x-dcl-conflicts:\n - reason\n - internalReason\n - domainMappingReason\n - revisionReason\n enum:\n - EXECUTION_REASON_UNDEFINED\n - JOB_STATUS_SERVICE_POLLING_ERROR\n - NON_ZERO_EXIT_CODE\n internalReason:\n type: string\n x-dcl-go-name: InternalReason\n x-dcl-go-type: JobTerminalConditionInternalReasonEnum\n description: 'A reason for the internal condition. Possible values:\n INTERNAL_REASON_UNDEFINED, CONFLICTING_REVISION_NAME, REVISION_MISSING,\n CONFIGURATION_MISSING, ASSIGNING_TRAFFIC, UPDATING_INGRESS_TRAFFIC_ALLOWED,\n REVISION_ORG_POLICY_VIOLATION, ENABLING_GCFV2_URI_SUPPORT'\n x-dcl-conflicts:\n - reason\n - domainMappingReason\n - revisionReason\n - executionReason\n enum:\n - INTERNAL_REASON_UNDEFINED\n - CONFLICTING_REVISION_NAME\n - REVISION_MISSING\n - CONFIGURATION_MISSING\n - ASSIGNING_TRAFFIC\n - UPDATING_INGRESS_TRAFFIC_ALLOWED\n - REVISION_ORG_POLICY_VIOLATION\n - ENABLING_GCFV2_URI_SUPPORT\n lastTransitionTime:\n type: string\n format: date-time\n x-dcl-go-name: LastTransitionTime\n description: Last time the condition transitioned from one status to\n another.\n message:\n type: string\n x-dcl-go-name: Message\n description: Human readable message indicating details about the current\n status.\n reason:\n type: string\n x-dcl-go-name: Reason\n x-dcl-go-type: JobTerminalConditionReasonEnum\n description: 'A common (service-level) reason for this condition. Possible\n values: COMMON_REASON_UNDEFINED, UNKNOWN, ROUTE_MISSING, REVISION_FAILED,\n PROGRESS_DEADLINE_EXCEEDED, BUILD_STEP_FAILED, CONTAINER_MISSING,\n CONTAINER_PERMISSION_DENIED, CONTAINER_IMAGE_UNAUTHORIZED, CONTAINER_IMAGE_AUTHORIZATION_CHECK_FAILED,\n ENCRYPTION_KEY_PERMISSION_DENIED, ENCRYPTION_KEY_CHECK_FAILED, SECRETS_ACCESS_CHECK_FAILED,\n WAITING_FOR_OPERATION, IMMEDIATE_RETRY, POSTPONED_RETRY'\n x-dcl-conflicts:\n - internalReason\n - domainMappingReason\n - revisionReason\n - executionReason\n enum:\n - COMMON_REASON_UNDEFINED\n - UNKNOWN\n - ROUTE_MISSING\n - REVISION_FAILED\n - PROGRESS_DEADLINE_EXCEEDED\n - BUILD_STEP_FAILED\n - CONTAINER_MISSING\n - CONTAINER_PERMISSION_DENIED\n - CONTAINER_IMAGE_UNAUTHORIZED\n - CONTAINER_IMAGE_AUTHORIZATION_CHECK_FAILED\n - ENCRYPTION_KEY_PERMISSION_DENIED\n - ENCRYPTION_KEY_CHECK_FAILED\n - SECRETS_ACCESS_CHECK_FAILED\n - WAITING_FOR_OPERATION\n - IMMEDIATE_RETRY\n - POSTPONED_RETRY\n revisionReason:\n type: string\n x-dcl-go-name: RevisionReason\n x-dcl-go-type: JobTerminalConditionRevisionReasonEnum\n description: 'A reason for the revision condition. Possible values:\n REVISION_REASON_UNDEFINED, PENDING, RESERVE, RETIRED, RETIRING, RECREATING,\n HEALTH_CHECK_CONTAINER_ERROR, CUSTOMIZED_PATH_RESPONSE_PENDING, MIN_INSTANCES_NOT_PROVISIONED,\n ACTIVE_REVISION_LIMIT_REACHED, NO_DEPLOYMENT, HEALTH_CHECK_SKIPPED'\n x-dcl-conflicts:\n - reason\n - internalReason\n - domainMappingReason\n - executionReason\n enum:\n - REVISION_REASON_UNDEFINED\n - PENDING\n - RESERVE\n - RETIRED\n - RETIRING\n - RECREATING\n - HEALTH_CHECK_CONTAINER_ERROR\n - CUSTOMIZED_PATH_RESPONSE_PENDING\n - MIN_INSTANCES_NOT_PROVISIONED\n - ACTIVE_REVISION_LIMIT_REACHED\n - NO_DEPLOYMENT\n - HEALTH_CHECK_SKIPPED\n severity:\n type: string\n x-dcl-go-name: Severity\n x-dcl-go-type: JobTerminalConditionSeverityEnum\n description: 'How to interpret failures of this condition, one of Error,\n Warning, Info Possible values: SEVERITY_UNSPECIFIED, ERROR, WARNING,\n INFO'\n enum:\n - SEVERITY_UNSPECIFIED\n - ERROR\n - WARNING\n - INFO\n state:\n type: string\n x-dcl-go-name: State\n x-dcl-go-type: JobTerminalConditionStateEnum\n description: 'State of the condition. Possible values: STATE_UNSPECIFIED,\n CONDITION_PENDING, CONDITION_RECONCILING, CONDITION_FAILED, CONDITION_SUCCEEDED'\n enum:\n - STATE_UNSPECIFIED\n - CONDITION_PENDING\n - CONDITION_RECONCILING\n - CONDITION_FAILED\n - CONDITION_SUCCEEDED\n type:\n type: string\n x-dcl-go-name: Type\n description: 'type is used to communicate the status of the reconciliation\n process. See also: https://github.com/knative/serving/blob/main/docs/spec/errors.md#error-conditions-and-reporting\n Types common to all resources include: * \"Ready\": True when the Resource\n is ready.'\n uid:\n type: string\n x-dcl-go-name: Uid\n readOnly: true\n description: Output only. Server assigned unique identifier for the Execution.\n The value is a UUID4 string and guaranteed to remain unchanged until the\n resource is deleted.\n x-kubernetes-immutable: true\n updateTime:\n type: string\n format: date-time\n x-dcl-go-name: UpdateTime\n readOnly: true\n description: Output only. The last-modified time.\n x-kubernetes-immutable: true\n") +var YAML_job = []byte("info:\n title: Run/Job\n description: The Run Job resource\n x-dcl-struct-name: Job\n x-dcl-has-iam: true\npaths:\n get:\n description: The function used to get information about a Job\n parameters:\n - name: Job\n required: true\n description: A full instance of a Job\n apply:\n description: The function used to apply information about a Job\n parameters:\n - name: Job\n required: true\n description: A full instance of a Job\n delete:\n description: The function used to delete a Job\n parameters:\n - name: Job\n required: true\n description: A full instance of a Job\n deleteAll:\n description: The function used to delete all Job\n parameters:\n - name: project\n required: true\n schema:\n type: string\n - name: location\n required: true\n schema:\n type: string\n list:\n description: The function used to list information about many Job\n parameters:\n - name: project\n required: true\n schema:\n type: string\n - name: location\n required: true\n schema:\n type: string\ncomponents:\n schemas:\n Job:\n title: Job\n x-dcl-id: projects/{{project}}/locations/{{location}}/jobs/{{name}}\n x-dcl-parent-container: project\n x-dcl-has-iam: true\n type: object\n required:\n - name\n - template\n - project\n - location\n properties:\n annotations:\n type: object\n additionalProperties:\n type: string\n x-dcl-go-name: Annotations\n description: 'KRM-style annotations for the resource. Unstructured key value\n map that may be set by external tools to store and arbitrary metadata.\n They are not queryable and should be preserved when modifying objects.\n Cloud Run will populate some annotations using ''run.googleapis.com''\n or ''serving.knative.dev'' namespaces. This field follows Kubernetes annotations''\n namespacing, limits, and rules. More info: https://kubernetes.io/docs/user-guide/annotations'\n binaryAuthorization:\n type: object\n x-dcl-go-name: BinaryAuthorization\n x-dcl-go-type: JobBinaryAuthorization\n description: Settings for the Binary Authorization feature.\n properties:\n breakglassJustification:\n type: string\n x-dcl-go-name: BreakglassJustification\n description: If present, indicates to use Breakglass using this justification.\n If use_default is False, then it must be empty. For more information\n on breakglass, see https://cloud.google.com/binary-authorization/docs/using-breakglass\n useDefault:\n type: boolean\n x-dcl-go-name: UseDefault\n description: If True, indicates to use the default project's binary\n authorization policy. If False, binary authorization will be disabled.\n client:\n type: string\n x-dcl-go-name: Client\n description: Arbitrary identifier for the API client.\n clientVersion:\n type: string\n x-dcl-go-name: ClientVersion\n description: Arbitrary version identifier for the API client.\n conditions:\n type: array\n x-dcl-go-name: Conditions\n readOnly: true\n description: Output only. The Conditions of all other associated sub-resources.\n They contain additional diagnostics information in case the Job does not\n reach its desired state. See comments in `reconciling` for additional\n information on reconciliation process in Cloud Run.\n x-kubernetes-immutable: true\n x-dcl-list-type: list\n items:\n type: object\n x-dcl-go-type: JobConditions\n properties:\n executionReason:\n type: string\n x-dcl-go-name: ExecutionReason\n x-dcl-go-type: JobConditionsExecutionReasonEnum\n description: 'A reason for the execution condition. Possible values:\n EXECUTION_REASON_UNDEFINED, JOB_STATUS_SERVICE_POLLING_ERROR, NON_ZERO_EXIT_CODE'\n x-dcl-conflicts:\n - reason\n - revisionReason\n enum:\n - EXECUTION_REASON_UNDEFINED\n - JOB_STATUS_SERVICE_POLLING_ERROR\n - NON_ZERO_EXIT_CODE\n lastTransitionTime:\n type: string\n format: date-time\n x-dcl-go-name: LastTransitionTime\n description: Last time the condition transitioned from one status\n to another.\n message:\n type: string\n x-dcl-go-name: Message\n description: Human readable message indicating details about the current\n status.\n reason:\n type: string\n x-dcl-go-name: Reason\n x-dcl-go-type: JobConditionsReasonEnum\n description: 'A common (service-level) reason for this condition.\n Possible values: COMMON_REASON_UNDEFINED, UNKNOWN, REVISION_FAILED,\n PROGRESS_DEADLINE_EXCEEDED, BUILD_STEP_FAILED, CONTAINER_MISSING,\n CONTAINER_PERMISSION_DENIED, CONTAINER_IMAGE_UNAUTHORIZED, CONTAINER_IMAGE_AUTHORIZATION_CHECK_FAILED,\n ENCRYPTION_KEY_PERMISSION_DENIED, ENCRYPTION_KEY_CHECK_FAILED, SECRETS_ACCESS_CHECK_FAILED,\n WAITING_FOR_OPERATION, IMMEDIATE_RETRY, POSTPONED_RETRY'\n x-dcl-conflicts:\n - revisionReason\n - executionReason\n enum:\n - COMMON_REASON_UNDEFINED\n - UNKNOWN\n - REVISION_FAILED\n - PROGRESS_DEADLINE_EXCEEDED\n - BUILD_STEP_FAILED\n - CONTAINER_MISSING\n - CONTAINER_PERMISSION_DENIED\n - CONTAINER_IMAGE_UNAUTHORIZED\n - CONTAINER_IMAGE_AUTHORIZATION_CHECK_FAILED\n - ENCRYPTION_KEY_PERMISSION_DENIED\n - ENCRYPTION_KEY_CHECK_FAILED\n - SECRETS_ACCESS_CHECK_FAILED\n - WAITING_FOR_OPERATION\n - IMMEDIATE_RETRY\n - POSTPONED_RETRY\n revisionReason:\n type: string\n x-dcl-go-name: RevisionReason\n x-dcl-go-type: JobConditionsRevisionReasonEnum\n description: 'A reason for the revision condition. Possible values:\n REVISION_REASON_UNDEFINED, PENDING, RESERVE, RETIRED, RETIRING,\n RECREATING, HEALTH_CHECK_CONTAINER_ERROR, CUSTOMIZED_PATH_RESPONSE_PENDING,\n MIN_INSTANCES_NOT_PROVISIONED, ACTIVE_REVISION_LIMIT_REACHED, NO_DEPLOYMENT,\n HEALTH_CHECK_SKIPPED'\n x-dcl-conflicts:\n - reason\n - executionReason\n enum:\n - REVISION_REASON_UNDEFINED\n - PENDING\n - RESERVE\n - RETIRED\n - RETIRING\n - RECREATING\n - HEALTH_CHECK_CONTAINER_ERROR\n - CUSTOMIZED_PATH_RESPONSE_PENDING\n - MIN_INSTANCES_NOT_PROVISIONED\n - ACTIVE_REVISION_LIMIT_REACHED\n - NO_DEPLOYMENT\n - HEALTH_CHECK_SKIPPED\n severity:\n type: string\n x-dcl-go-name: Severity\n x-dcl-go-type: JobConditionsSeverityEnum\n description: 'How to interpret failures of this condition, one of\n Error, Warning, Info Possible values: SEVERITY_UNSPECIFIED, ERROR,\n WARNING, INFO'\n enum:\n - SEVERITY_UNSPECIFIED\n - ERROR\n - WARNING\n - INFO\n state:\n type: string\n x-dcl-go-name: State\n x-dcl-go-type: JobConditionsStateEnum\n description: 'State of the condition. Possible values: STATE_UNSPECIFIED,\n CONDITION_PENDING, CONDITION_RECONCILING, CONDITION_FAILED, CONDITION_SUCCEEDED'\n enum:\n - STATE_UNSPECIFIED\n - CONDITION_PENDING\n - CONDITION_RECONCILING\n - CONDITION_FAILED\n - CONDITION_SUCCEEDED\n type:\n type: string\n x-dcl-go-name: Type\n description: 'type is used to communicate the status of the reconciliation\n process. See also: https://github.com/knative/serving/blob/main/docs/spec/errors.md#error-conditions-and-reporting\n Types common to all resources include: * \"Ready\": True when the\n Resource is ready.'\n createTime:\n type: string\n format: date-time\n x-dcl-go-name: CreateTime\n readOnly: true\n description: Output only. The creation time.\n x-kubernetes-immutable: true\n creator:\n type: string\n x-dcl-go-name: Creator\n readOnly: true\n description: Output only. Email address of the authenticated creator.\n x-kubernetes-immutable: true\n deleteTime:\n type: string\n format: date-time\n x-dcl-go-name: DeleteTime\n readOnly: true\n description: Output only. The deletion time.\n x-kubernetes-immutable: true\n etag:\n type: string\n x-dcl-go-name: Etag\n readOnly: true\n description: Output only. A system-generated fingerprint for this version\n of the resource. May be used to detect modification conflict during updates.\n x-kubernetes-immutable: true\n executionCount:\n type: integer\n format: int64\n x-dcl-go-name: ExecutionCount\n readOnly: true\n description: Output only. Number of executions created for this job.\n x-kubernetes-immutable: true\n expireTime:\n type: string\n format: date-time\n x-dcl-go-name: ExpireTime\n readOnly: true\n description: Output only. For a deleted resource, the time after which it\n will be permamently deleted.\n x-kubernetes-immutable: true\n generation:\n type: integer\n format: int64\n x-dcl-go-name: Generation\n readOnly: true\n description: Output only. A number that monotonically increases every time\n the user modifies the desired state.\n x-kubernetes-immutable: true\n labels:\n type: object\n additionalProperties:\n type: string\n x-dcl-go-name: Labels\n readOnly: true\n description: KRM-style labels for the resource. User-provided labels are\n shared with Google's billing system, so they can be used to filter, or\n break down billing charges by team, component, environment, state, etc.\n For more information, visit https://cloud.google.com/resource-manager/docs/creating-managing-labels\n or https://cloud.google.com/run/docs/configuring/labels Cloud Run will\n populate some labels with 'run.googleapis.com' or 'serving.knative.dev'\n namespaces. Those labels are read-only, and user changes will not be preserved.\n x-kubernetes-immutable: true\n lastModifier:\n type: string\n x-dcl-go-name: LastModifier\n readOnly: true\n description: Output only. Email address of the last authenticated modifier.\n x-kubernetes-immutable: true\n latestCreatedExecution:\n type: object\n x-dcl-go-name: LatestCreatedExecution\n x-dcl-go-type: JobLatestCreatedExecution\n readOnly: true\n description: Output only. Name of the last created execution.\n properties:\n createTime:\n type: string\n format: date-time\n x-dcl-go-name: CreateTime\n description: Creation timestamp of the execution.\n name:\n type: string\n x-dcl-go-name: Name\n description: Name of the execution.\n x-dcl-references:\n - resource: Run/Execution\n field: selfLink\n parent: true\n latestSucceededExecution:\n type: object\n x-dcl-go-name: LatestSucceededExecution\n x-dcl-go-type: JobLatestSucceededExecution\n readOnly: true\n description: Output only. Name of the last succeeded execution.\n properties:\n createTime:\n type: string\n format: date-time\n x-dcl-go-name: CreateTime\n description: Creation timestamp of the execution.\n name:\n type: string\n x-dcl-go-name: Name\n description: Name of the execution.\n x-dcl-references:\n - resource: Run/Execution\n field: selfLink\n parent: true\n launchStage:\n type: string\n x-dcl-go-name: LaunchStage\n x-dcl-go-type: JobLaunchStageEnum\n description: 'The launch stage as defined by [Google Cloud Platform Launch\n Stages](https://cloud.google.com/terms/launch-stages). Cloud Run supports\n `ALPHA`, `BETA`, and `GA`. If no value is specified, GA is assumed. Possible\n values: LAUNCH_STAGE_UNSPECIFIED, UNIMPLEMENTED, PRELAUNCH, EARLY_ACCESS,\n ALPHA, BETA, GA, DEPRECATED'\n enum:\n - LAUNCH_STAGE_UNSPECIFIED\n - UNIMPLEMENTED\n - PRELAUNCH\n - EARLY_ACCESS\n - ALPHA\n - BETA\n - GA\n - DEPRECATED\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 fully qualified name of this Job. Format: projects/{project}/locations/{location}/jobs/{job}'\n observedGeneration:\n type: integer\n format: int64\n x-dcl-go-name: ObservedGeneration\n readOnly: true\n description: Output only. The generation of this Job. See comments in `reconciling`\n for additional information on reconciliation process in Cloud Run.\n x-kubernetes-immutable: true\n project:\n type: string\n x-dcl-go-name: Project\n description: The project for the resource\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Cloudresourcemanager/Project\n field: name\n parent: true\n reconciling:\n type: boolean\n x-dcl-go-name: Reconciling\n readOnly: true\n description: 'Output only. Returns true if the Job is currently being acted\n upon by the system to bring it into the desired state. When a new Job\n is created, or an existing one is updated, Cloud Run will asynchronously\n perform all necessary steps to bring the Job to the desired state. This\n process is called reconciliation. While reconciliation is in process,\n `observed_generation` and `latest_succeeded_execution`, will have transient\n values that might mismatch the intended state: Once reconciliation is\n over (and this field is false), there are two possible outcomes: reconciliation\n succeeded and the state matches the Job, or there was an error, and reconciliation\n failed. This state can be found in `terminal_condition.state`. If reconciliation\n succeeded, the following fields will match: `observed_generation` and\n `generation`, `latest_succeeded_execution` and `latest_created_execution`.\n If reconciliation failed, `observed_generation` and `latest_succeeded_execution`\n will have the state of the last succeeded execution or empty for newly\n created Job. Additional information on the failure can be found in `terminal_condition`\n and `conditions`.'\n x-kubernetes-immutable: true\n template:\n type: object\n x-dcl-go-name: Template\n x-dcl-go-type: JobTemplate\n description: Required. The template used to create executions for this Job.\n required:\n - template\n properties:\n annotations:\n type: object\n additionalProperties:\n type: string\n x-dcl-go-name: Annotations\n description: KRM-style annotations for the resource.\n labels:\n type: object\n additionalProperties:\n type: string\n x-dcl-go-name: Labels\n description: KRM-style labels for the resource.\n parallelism:\n type: integer\n format: int64\n x-dcl-go-name: Parallelism\n description: 'Specifies the maximum desired number of tasks the execution\n should run at any given time. Must be <= task_count. The actual number\n of tasks running in steady state will be less than this number when\n ((.spec.task_count - .status.successful) < .spec.parallelism), i.e.\n when the work left to do is less than max parallelism. More info:\n https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/'\n x-dcl-server-default: true\n taskCount:\n type: integer\n format: int64\n x-dcl-go-name: TaskCount\n description: 'Specifies the desired number of tasks the execution should\n run. Setting to 1 means that parallelism is limited to 1 and the success\n of that task signals the success of the execution. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/'\n x-dcl-server-default: true\n template:\n type: object\n x-dcl-go-name: Template\n x-dcl-go-type: JobTemplateTemplate\n description: Required. Describes the task(s) that will be created when\n executing an execution.\n properties:\n containers:\n type: array\n x-dcl-go-name: Containers\n description: Holds the single container that defines the unit of\n execution for this task.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: object\n x-dcl-go-type: JobTemplateTemplateContainers\n required:\n - image\n properties:\n args:\n type: array\n x-dcl-go-name: Args\n description: 'Arguments to the entrypoint. The docker image''s\n CMD is used if this is not provided. Variable references\n $(VAR_NAME) are expanded using the container''s environment.\n If a variable cannot be resolved, the reference in the input\n string will be unchanged. The $(VAR_NAME) syntax can be\n escaped with a double $$, ie: $$(VAR_NAME). Escaped references\n will never be expanded, regardless of whether the variable\n exists or not. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell'\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: string\n command:\n type: array\n x-dcl-go-name: Command\n description: 'Entrypoint array. Not executed within a shell.\n The docker image''s ENTRYPOINT is used if this is not provided.\n Variable references $(VAR_NAME) are expanded using the container''s\n environment. If a variable cannot be resolved, the reference\n in the input string will be unchanged. The $(VAR_NAME) syntax\n can be escaped with a double $$, ie: $$(VAR_NAME). Escaped\n references will never be expanded, regardless of whether\n the variable exists or not. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell'\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: string\n env:\n type: array\n x-dcl-go-name: Env\n description: List of environment variables to set in the container.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: object\n x-dcl-go-type: JobTemplateTemplateContainersEnv\n required:\n - name\n properties:\n name:\n type: string\n x-dcl-go-name: Name\n description: Required. Name of the environment variable.\n Must be a C_IDENTIFIER, and mnay not exceed 32768\n characters.\n value:\n type: string\n x-dcl-go-name: Value\n description: 'Variable references $(VAR_NAME) are expanded\n using the previous defined environment variables in\n the container and any route environment variables.\n If a variable cannot be resolved, the reference in\n the input string will be unchanged. The $(VAR_NAME)\n syntax can be escaped with a double $$, ie: $$(VAR_NAME).\n Escaped references will never be expanded, regardless\n of whether the variable exists or not. Defaults to\n \"\", and the maximum length is 32768 bytes.'\n x-dcl-conflicts:\n - valueSource\n valueSource:\n type: object\n x-dcl-go-name: ValueSource\n x-dcl-go-type: JobTemplateTemplateContainersEnvValueSource\n description: Source for the environment variable's value.\n x-dcl-conflicts:\n - value\n properties:\n secretKeyRef:\n type: object\n x-dcl-go-name: SecretKeyRef\n x-dcl-go-type: JobTemplateTemplateContainersEnvValueSourceSecretKeyRef\n description: Selects a secret and a specific version\n from Cloud Secret Manager.\n required:\n - secret\n properties:\n secret:\n type: string\n x-dcl-go-name: Secret\n description: 'Required. The name of the secret\n in Cloud Secret Manager. Format: {secret_name}\n if the secret is in the same project. projects/{project}/secrets/{secret_name}\n if the secret is in a different project.'\n x-dcl-references:\n - resource: Secretmanager/Secret\n field: selfLink\n version:\n type: string\n x-dcl-go-name: Version\n description: The Cloud Secret Manager secret\n version. Can be 'latest' for the latest value\n or an integer for a specific version.\n x-dcl-references:\n - resource: Secretmanager/SecretVersion\n field: selfLink\n image:\n type: string\n x-dcl-go-name: Image\n description: 'Required. URL of the Container image in Google\n Container Registry or Docker More info: https://kubernetes.io/docs/concepts/containers/images'\n name:\n type: string\n x-dcl-go-name: Name\n description: Name of the container specified as a DNS_LABEL.\n ports:\n type: array\n x-dcl-go-name: Ports\n description: List of ports to expose from the container. Only\n a single port can be specified. The specified ports must\n be listening on all interfaces (0.0.0.0) within the container\n to be accessible. If omitted, a port number will be chosen\n and passed to the container through the PORT environment\n variable for the container to listen on.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: object\n x-dcl-go-type: JobTemplateTemplateContainersPorts\n properties:\n containerPort:\n type: integer\n format: int64\n x-dcl-go-name: ContainerPort\n description: Port number the container listens on. This\n must be a valid TCP port number, 0 < container_port\n < 65536.\n name:\n type: string\n x-dcl-go-name: Name\n description: If specified, used to specify which protocol\n to use. Allowed values are \"http1\" and \"h2c\".\n resources:\n type: object\n x-dcl-go-name: Resources\n x-dcl-go-type: JobTemplateTemplateContainersResources\n description: 'Compute Resource requirements by this container.\n More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources'\n x-dcl-server-default: true\n properties:\n cpuIdle:\n type: boolean\n x-dcl-go-name: CpuIdle\n description: Determines whether CPU should be throttled\n or not outside of requests.\n x-dcl-server-default: true\n limits:\n type: object\n additionalProperties:\n type: string\n x-dcl-go-name: Limits\n description: 'Only memory and CPU are supported. Note:\n The only supported values for CPU are ''1'', ''2'',\n and ''4''. Setting 4 CPU requires at least 2Gi of memory.\n The values of the map is string form of the ''quantity''\n k8s type: https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go'\n volumeMounts:\n type: array\n x-dcl-go-name: VolumeMounts\n description: Volume to mount into the container's filesystem.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: object\n x-dcl-go-type: JobTemplateTemplateContainersVolumeMounts\n required:\n - name\n - mountPath\n properties:\n mountPath:\n type: string\n x-dcl-go-name: MountPath\n description: Required. Path within the container at\n which the volume should be mounted. Must not contain\n ':'. For Cloud SQL volumes, it can be left empty,\n or must otherwise be `/cloudsql`. All instances defined\n in the Volume will be available as `/cloudsql/[instance]`.\n For more information on Cloud SQL volumes, visit https://cloud.google.com/sql/docs/mysql/connect-run\n name:\n type: string\n x-dcl-go-name: Name\n description: Required. This must match the Name of a\n Volume.\n encryptionKey:\n type: string\n x-dcl-go-name: EncryptionKey\n description: A reference to a customer managed encryption key (CMEK)\n to use to encrypt this container image. For more information,\n go to https://cloud.google.com/run/docs/securing/using-cmek\n x-dcl-references:\n - resource: Cloudkms/CryptoKey\n field: selfLink\n executionEnvironment:\n type: string\n x-dcl-go-name: ExecutionEnvironment\n x-dcl-go-type: JobTemplateTemplateExecutionEnvironmentEnum\n description: 'The execution environment being used to host this\n Task. Possible values: EXECUTION_ENVIRONMENT_UNSPECIFIED, EXECUTION_ENVIRONMENT_DEFAULT,\n EXECUTION_ENVIRONMENT_GEN2'\n enum:\n - EXECUTION_ENVIRONMENT_UNSPECIFIED\n - EXECUTION_ENVIRONMENT_DEFAULT\n - EXECUTION_ENVIRONMENT_GEN2\n maxRetries:\n type: integer\n format: int64\n x-dcl-go-name: MaxRetries\n description: Number of retries allowed per Task, before marking\n this Task failed.\n serviceAccount:\n type: string\n x-dcl-go-name: ServiceAccount\n description: Email address of the IAM service account associated\n with the Task of a Job. The service account represents the identity\n of the running task, and determines what permissions the task\n has. If not provided, the task will use the project's default\n service account.\n x-dcl-server-default: true\n timeout:\n type: string\n x-dcl-go-name: Timeout\n description: Max allowed time duration the Task may be active before\n the system will actively try to mark it failed and kill associated\n containers. This applies per attempt of a task, meaning each retry\n can run for the full timeout.\n x-dcl-server-default: true\n volumes:\n type: array\n x-dcl-go-name: Volumes\n description: A list of Volumes to make available to containers.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: object\n x-dcl-go-type: JobTemplateTemplateVolumes\n required:\n - name\n properties:\n cloudSqlInstance:\n type: object\n x-dcl-go-name: CloudSqlInstance\n x-dcl-go-type: JobTemplateTemplateVolumesCloudSqlInstance\n description: For Cloud SQL volumes, contains the specific\n instances that should be mounted. Visit https://cloud.google.com/sql/docs/mysql/connect-run\n for more information on how to connect Cloud SQL and Cloud\n Run.\n x-dcl-conflicts:\n - secret\n properties:\n connections:\n type: array\n x-dcl-go-name: Connections\n description: 'The Cloud SQL instance connection names,\n as can be found in https://console.cloud.google.com/sql/instances.\n Visit https://cloud.google.com/sql/docs/mysql/connect-run\n for more information on how to connect Cloud SQL and\n Cloud Run. Format: {project}:{location}:{instance}'\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: string\n name:\n type: string\n x-dcl-go-name: Name\n description: Required. Volume's name.\n secret:\n type: object\n x-dcl-go-name: Secret\n x-dcl-go-type: JobTemplateTemplateVolumesSecret\n description: 'Secret represents a secret that should populate\n this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret'\n x-dcl-conflicts:\n - cloudSqlInstance\n required:\n - secret\n properties:\n defaultMode:\n type: integer\n format: int64\n x-dcl-go-name: DefaultMode\n description: 'Integer representation of mode bits to use\n on created files by default. Must be a value between\n 0000 and 0777 (octal), defaulting to 0644. Directories\n within the path are not affected by this setting. Notes\n * Internally, a umask of 0222 will be applied to any\n non-zero value. * This is an integer representation\n of the mode bits. So, the octal integer value should\n look exactly as the chmod numeric notation with a leading\n zero. Some examples: for chmod 777 (a=rwx), set to 0777\n (octal) or 511 (base-10). For chmod 640 (u=rw,g=r),\n set to 0640 (octal) or 416 (base-10). For chmod 755\n (u=rwx,g=rx,o=rx), set to 0755 (octal) or 493 (base-10).\n * This might be in conflict with other options that\n affect the file mode, like fsGroup, and the result can\n be other mode bits set. This might be in conflict with\n other options that affect the file mode, like fsGroup,\n and as a result, other mode bits could be set.'\n items:\n type: array\n x-dcl-go-name: Items\n description: If unspecified, the volume will expose a\n file whose name is the secret, relative to VolumeMount.mount_path.\n If specified, the key will be used as the version to\n fetch from Cloud Secret Manager and the path will be\n the name of the file exposed in the volume. When items\n are defined, they must specify a path and a version.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: object\n x-dcl-go-type: JobTemplateTemplateVolumesSecretItems\n required:\n - path\n properties:\n mode:\n type: integer\n format: int64\n x-dcl-go-name: Mode\n description: 'Integer octal mode bits to use on\n this file, must be a value between 01 and 0777\n (octal). If 0 or not set, the Volume''s default\n mode will be used. Notes * Internally, a umask\n of 0222 will be applied to any non-zero value.\n * This is an integer representation of the mode\n bits. So, the octal integer value should look\n exactly as the chmod numeric notation with a leading\n zero. Some examples: for chmod 777 (a=rwx), set\n to 0777 (octal) or 511 (base-10). For chmod 640\n (u=rw,g=r), set to 0640 (octal) or 416 (base-10).\n For chmod 755 (u=rwx,g=rx,o=rx), set to 0755 (octal)\n or 493 (base-10). * This might be in conflict\n with other options that affect the file mode,\n like fsGroup, and the result can be other mode\n bits set.'\n path:\n type: string\n x-dcl-go-name: Path\n description: Required. The relative path of the\n secret in the container.\n version:\n type: string\n x-dcl-go-name: Version\n description: The Cloud Secret Manager secret version.\n Can be 'latest' for the latest value or an integer\n for a specific version.\n secret:\n type: string\n x-dcl-go-name: Secret\n description: 'Required. The name of the secret in Cloud\n Secret Manager. Format: {secret} if the secret is in\n the same project. projects/{project}/secrets/{secret}\n if the secret is in a different project.'\n vpcAccess:\n type: object\n x-dcl-go-name: VPCAccess\n x-dcl-go-type: JobTemplateTemplateVPCAccess\n description: VPC Access configuration to use for this Task. For\n more information, visit https://cloud.google.com/run/docs/configuring/connecting-vpc.\n properties:\n connector:\n type: string\n x-dcl-go-name: Connector\n description: 'VPC Access connector name. Format: projects/{project}/locations/{location}/connectors/{connector}'\n x-dcl-references:\n - resource: Vpcaccess/Connector\n field: selfLink\n egress:\n type: string\n x-dcl-go-name: Egress\n x-dcl-go-type: JobTemplateTemplateVPCAccessEgressEnum\n description: 'Traffic VPC egress settings. Possible values:\n VPC_EGRESS_UNSPECIFIED, ALL_TRAFFIC, PRIVATE_RANGES_ONLY'\n enum:\n - VPC_EGRESS_UNSPECIFIED\n - ALL_TRAFFIC\n - PRIVATE_RANGES_ONLY\n terminalCondition:\n type: object\n x-dcl-go-name: TerminalCondition\n x-dcl-go-type: JobTerminalCondition\n readOnly: true\n description: Output only. The Condition of this Job, containing its readiness\n status, and detailed error information in case it did not reach the desired\n state.\n properties:\n domainMappingReason:\n type: string\n x-dcl-go-name: DomainMappingReason\n x-dcl-go-type: JobTerminalConditionDomainMappingReasonEnum\n description: 'A reason for the domain mapping condition. Possible values:\n DOMAIN_MAPPING_REASON_UNDEFINED, ROUTE_NOT_READY, PERMISSION_DENIED,\n CERTIFICATE_ALREADY_EXISTS, MAPPING_ALREADY_EXISTS, CERTIFICATE_PENDING,\n CERTIFICATE_FAILED'\n x-dcl-conflicts:\n - reason\n - internalReason\n - revisionReason\n - executionReason\n enum:\n - DOMAIN_MAPPING_REASON_UNDEFINED\n - ROUTE_NOT_READY\n - PERMISSION_DENIED\n - CERTIFICATE_ALREADY_EXISTS\n - MAPPING_ALREADY_EXISTS\n - CERTIFICATE_PENDING\n - CERTIFICATE_FAILED\n executionReason:\n type: string\n x-dcl-go-name: ExecutionReason\n x-dcl-go-type: JobTerminalConditionExecutionReasonEnum\n description: 'A reason for the execution condition. Possible values:\n EXECUTION_REASON_UNDEFINED, JOB_STATUS_SERVICE_POLLING_ERROR, NON_ZERO_EXIT_CODE'\n x-dcl-conflicts:\n - reason\n - internalReason\n - domainMappingReason\n - revisionReason\n enum:\n - EXECUTION_REASON_UNDEFINED\n - JOB_STATUS_SERVICE_POLLING_ERROR\n - NON_ZERO_EXIT_CODE\n internalReason:\n type: string\n x-dcl-go-name: InternalReason\n x-dcl-go-type: JobTerminalConditionInternalReasonEnum\n description: 'A reason for the internal condition. Possible values:\n INTERNAL_REASON_UNDEFINED, CONFLICTING_REVISION_NAME, REVISION_MISSING,\n CONFIGURATION_MISSING, ASSIGNING_TRAFFIC, UPDATING_INGRESS_TRAFFIC_ALLOWED,\n REVISION_ORG_POLICY_VIOLATION, ENABLING_GCFV2_URI_SUPPORT'\n x-dcl-conflicts:\n - reason\n - domainMappingReason\n - revisionReason\n - executionReason\n enum:\n - INTERNAL_REASON_UNDEFINED\n - CONFLICTING_REVISION_NAME\n - REVISION_MISSING\n - CONFIGURATION_MISSING\n - ASSIGNING_TRAFFIC\n - UPDATING_INGRESS_TRAFFIC_ALLOWED\n - REVISION_ORG_POLICY_VIOLATION\n - ENABLING_GCFV2_URI_SUPPORT\n lastTransitionTime:\n type: string\n format: date-time\n x-dcl-go-name: LastTransitionTime\n description: Last time the condition transitioned from one status to\n another.\n message:\n type: string\n x-dcl-go-name: Message\n description: Human readable message indicating details about the current\n status.\n reason:\n type: string\n x-dcl-go-name: Reason\n x-dcl-go-type: JobTerminalConditionReasonEnum\n description: 'A common (service-level) reason for this condition. Possible\n values: COMMON_REASON_UNDEFINED, UNKNOWN, ROUTE_MISSING, REVISION_FAILED,\n PROGRESS_DEADLINE_EXCEEDED, CONTAINER_MISSING, CONTAINER_PERMISSION_DENIED,\n CONTAINER_IMAGE_UNAUTHORIZED, CONTAINER_IMAGE_AUTHORIZATION_CHECK_FAILED,\n ENCRYPTION_KEY_PERMISSION_DENIED, ENCRYPTION_KEY_CHECK_FAILED, SECRETS_ACCESS_CHECK_FAILED,\n WAITING_FOR_OPERATION, IMMEDIATE_RETRY, POSTPONED_RETRY'\n x-dcl-conflicts:\n - internalReason\n - domainMappingReason\n - revisionReason\n - executionReason\n enum:\n - COMMON_REASON_UNDEFINED\n - UNKNOWN\n - ROUTE_MISSING\n - REVISION_FAILED\n - PROGRESS_DEADLINE_EXCEEDED\n - CONTAINER_MISSING\n - CONTAINER_PERMISSION_DENIED\n - CONTAINER_IMAGE_UNAUTHORIZED\n - CONTAINER_IMAGE_AUTHORIZATION_CHECK_FAILED\n - ENCRYPTION_KEY_PERMISSION_DENIED\n - ENCRYPTION_KEY_CHECK_FAILED\n - SECRETS_ACCESS_CHECK_FAILED\n - WAITING_FOR_OPERATION\n - IMMEDIATE_RETRY\n - POSTPONED_RETRY\n revisionReason:\n type: string\n x-dcl-go-name: RevisionReason\n x-dcl-go-type: JobTerminalConditionRevisionReasonEnum\n description: 'A reason for the revision condition. Possible values:\n REVISION_REASON_UNDEFINED, PENDING, RESERVE, RETIRED, RETIRING, RECREATING,\n HEALTH_CHECK_CONTAINER_ERROR, CUSTOMIZED_PATH_RESPONSE_PENDING, MIN_INSTANCES_NOT_PROVISIONED,\n ACTIVE_REVISION_LIMIT_REACHED, NO_DEPLOYMENT, HEALTH_CHECK_SKIPPED'\n x-dcl-conflicts:\n - reason\n - internalReason\n - domainMappingReason\n - executionReason\n enum:\n - REVISION_REASON_UNDEFINED\n - PENDING\n - RESERVE\n - RETIRED\n - RETIRING\n - RECREATING\n - HEALTH_CHECK_CONTAINER_ERROR\n - CUSTOMIZED_PATH_RESPONSE_PENDING\n - MIN_INSTANCES_NOT_PROVISIONED\n - ACTIVE_REVISION_LIMIT_REACHED\n - NO_DEPLOYMENT\n - HEALTH_CHECK_SKIPPED\n severity:\n type: string\n x-dcl-go-name: Severity\n x-dcl-go-type: JobTerminalConditionSeverityEnum\n description: 'How to interpret failures of this condition, one of Error,\n Warning, Info Possible values: SEVERITY_UNSPECIFIED, ERROR, WARNING,\n INFO'\n enum:\n - SEVERITY_UNSPECIFIED\n - ERROR\n - WARNING\n - INFO\n state:\n type: string\n x-dcl-go-name: State\n x-dcl-go-type: JobTerminalConditionStateEnum\n description: 'State of the condition. Possible values: STATE_UNSPECIFIED,\n CONDITION_PENDING, CONDITION_RECONCILING, CONDITION_FAILED, CONDITION_SUCCEEDED'\n enum:\n - STATE_UNSPECIFIED\n - CONDITION_PENDING\n - CONDITION_RECONCILING\n - CONDITION_FAILED\n - CONDITION_SUCCEEDED\n type:\n type: string\n x-dcl-go-name: Type\n description: 'type is used to communicate the status of the reconciliation\n process. See also: https://github.com/knative/serving/blob/main/docs/spec/errors.md#error-conditions-and-reporting\n Types common to all resources include: * \"Ready\": True when the Resource\n is ready.'\n uid:\n type: string\n x-dcl-go-name: Uid\n readOnly: true\n description: Output only. Server assigned unique identifier for the Execution.\n The value is a UUID4 string and guaranteed to remain unchanged until the\n resource is deleted.\n x-kubernetes-immutable: true\n updateTime:\n type: string\n format: date-time\n x-dcl-go-name: UpdateTime\n readOnly: true\n description: Output only. The last-modified time.\n x-kubernetes-immutable: true\n") -// 53305 bytes -// MD5: 94f2ef5fb0192d4ca4d056c7796a660f +// 50106 bytes +// MD5: bb318e128df06a73150a464dedbe5423 diff --git a/services/google/run/alpha/job_internal.go b/services/google/run/alpha/job_internal.go index 8d614601c..6efbfa589 100755 --- a/services/google/run/alpha/job_internal.go +++ b/services/google/run/alpha/job_internal.go @@ -186,7 +186,7 @@ func (r *JobTerminalCondition) validate() error { return nil } func (r *JobConditions) validate() error { - if err := dcl.ValidateAtMostOneOfFieldsSet([]string{"Reason", "InternalReason", "DomainMappingReason", "RevisionReason", "ExecutionReason"}, r.Reason, r.InternalReason, r.DomainMappingReason, r.RevisionReason, r.ExecutionReason); err != nil { + if err := dcl.ValidateAtMostOneOfFieldsSet([]string{"Reason", "RevisionReason", "ExecutionReason"}, r.Reason, r.RevisionReason, r.ExecutionReason); err != nil { return err } return nil @@ -197,9 +197,6 @@ func (r *JobLatestSucceededExecution) validate() error { func (r *JobLatestCreatedExecution) validate() error { return nil } -func (r *JobContainerStatuses) validate() error { - return nil -} func (r *Job) basePath() string { params := map[string]interface{}{} return dcl.Nprintf("https://run.googleapis.com/v2/", params) @@ -847,12 +844,6 @@ func canonicalizeJobNewState(c *Client, rawNew, rawDesired *Job) (*Job, error) { } } - if dcl.IsNotReturnedByServer(rawNew.ContainerStatuses) && dcl.IsNotReturnedByServer(rawDesired.ContainerStatuses) { - rawNew.ContainerStatuses = rawDesired.ContainerStatuses - } else { - rawNew.ContainerStatuses = canonicalizeNewJobContainerStatusesSlice(c, rawDesired.ContainerStatuses, rawNew.ContainerStatuses) - } - if dcl.IsNotReturnedByServer(rawNew.Etag) && dcl.IsNotReturnedByServer(rawDesired.Etag) { rawNew.Etag = rawDesired.Etag } else { @@ -3010,7 +3001,7 @@ func canonicalizeJobConditions(des, initial *JobConditions, opts ...dcl.ApplyOpt if des.Reason != nil || (initial != nil && initial.Reason != nil) { // Check if anything else is set. - if dcl.AnySet(des.InternalReason, des.DomainMappingReason, des.RevisionReason, des.ExecutionReason) { + if dcl.AnySet(des.RevisionReason, des.ExecutionReason) { des.Reason = nil if initial != nil { initial.Reason = nil @@ -3018,29 +3009,9 @@ func canonicalizeJobConditions(des, initial *JobConditions, opts ...dcl.ApplyOpt } } - if des.InternalReason != nil || (initial != nil && initial.InternalReason != nil) { - // Check if anything else is set. - if dcl.AnySet(des.Reason, des.DomainMappingReason, des.RevisionReason, des.ExecutionReason) { - des.InternalReason = nil - if initial != nil { - initial.InternalReason = nil - } - } - } - - if des.DomainMappingReason != nil || (initial != nil && initial.DomainMappingReason != nil) { - // Check if anything else is set. - if dcl.AnySet(des.Reason, des.InternalReason, des.RevisionReason, des.ExecutionReason) { - des.DomainMappingReason = nil - if initial != nil { - initial.DomainMappingReason = nil - } - } - } - if des.RevisionReason != nil || (initial != nil && initial.RevisionReason != nil) { // Check if anything else is set. - if dcl.AnySet(des.Reason, des.InternalReason, des.DomainMappingReason, des.ExecutionReason) { + if dcl.AnySet(des.Reason, des.ExecutionReason) { des.RevisionReason = nil if initial != nil { initial.RevisionReason = nil @@ -3050,7 +3021,7 @@ func canonicalizeJobConditions(des, initial *JobConditions, opts ...dcl.ApplyOpt if des.ExecutionReason != nil || (initial != nil && initial.ExecutionReason != nil) { // Check if anything else is set. - if dcl.AnySet(des.Reason, des.InternalReason, des.DomainMappingReason, des.RevisionReason) { + if dcl.AnySet(des.Reason, des.RevisionReason) { des.ExecutionReason = nil if initial != nil { initial.ExecutionReason = nil @@ -3098,18 +3069,6 @@ func canonicalizeJobConditions(des, initial *JobConditions, opts ...dcl.ApplyOpt } else { cDes.Reason = des.Reason } - if dcl.IsZeroValue(des.InternalReason) || (dcl.IsEmptyValueIndirect(des.InternalReason) && dcl.IsEmptyValueIndirect(initial.InternalReason)) { - // Desired and initial values are equivalent, so set canonical desired value to initial value. - cDes.InternalReason = initial.InternalReason - } else { - cDes.InternalReason = des.InternalReason - } - if dcl.IsZeroValue(des.DomainMappingReason) || (dcl.IsEmptyValueIndirect(des.DomainMappingReason) && dcl.IsEmptyValueIndirect(initial.DomainMappingReason)) { - // Desired and initial values are equivalent, so set canonical desired value to initial value. - cDes.DomainMappingReason = initial.DomainMappingReason - } else { - cDes.DomainMappingReason = des.DomainMappingReason - } if dcl.IsZeroValue(des.RevisionReason) || (dcl.IsEmptyValueIndirect(des.RevisionReason) && dcl.IsEmptyValueIndirect(initial.RevisionReason)) { // Desired and initial values are equivalent, so set canonical desired value to initial value. cDes.RevisionReason = initial.RevisionReason @@ -3457,129 +3416,6 @@ func canonicalizeNewJobLatestCreatedExecutionSlice(c *Client, des, nw []JobLates return items } -func canonicalizeJobContainerStatuses(des, initial *JobContainerStatuses, opts ...dcl.ApplyOption) *JobContainerStatuses { - if des == nil { - return initial - } - if des.empty { - return des - } - - if initial == nil { - return des - } - - cDes := &JobContainerStatuses{} - - if dcl.StringCanonicalize(des.Name, initial.Name) || dcl.IsZeroValue(des.Name) { - cDes.Name = initial.Name - } else { - cDes.Name = des.Name - } - if dcl.StringCanonicalize(des.ImageDigest, initial.ImageDigest) || dcl.IsZeroValue(des.ImageDigest) { - cDes.ImageDigest = initial.ImageDigest - } else { - cDes.ImageDigest = des.ImageDigest - } - - return cDes -} - -func canonicalizeJobContainerStatusesSlice(des, initial []JobContainerStatuses, opts ...dcl.ApplyOption) []JobContainerStatuses { - if dcl.IsEmptyValueIndirect(des) { - return initial - } - - if len(des) != len(initial) { - - items := make([]JobContainerStatuses, 0, len(des)) - for _, d := range des { - cd := canonicalizeJobContainerStatuses(&d, nil, opts...) - if cd != nil { - items = append(items, *cd) - } - } - return items - } - - items := make([]JobContainerStatuses, 0, len(des)) - for i, d := range des { - cd := canonicalizeJobContainerStatuses(&d, &initial[i], opts...) - if cd != nil { - items = append(items, *cd) - } - } - return items - -} - -func canonicalizeNewJobContainerStatuses(c *Client, des, nw *JobContainerStatuses) *JobContainerStatuses { - - if des == nil { - return nw - } - - if nw == nil { - if dcl.IsNotReturnedByServer(des) { - c.Config.Logger.Info("Found explicitly empty value for JobContainerStatuses while comparing non-nil desired to nil actual. Returning desired object.") - return des - } - return nil - } - - if dcl.StringCanonicalize(des.Name, nw.Name) { - nw.Name = des.Name - } - if dcl.StringCanonicalize(des.ImageDigest, nw.ImageDigest) { - nw.ImageDigest = des.ImageDigest - } - - return nw -} - -func canonicalizeNewJobContainerStatusesSet(c *Client, des, nw []JobContainerStatuses) []JobContainerStatuses { - if des == nil { - return nw - } - var reorderedNew []JobContainerStatuses - for _, d := range des { - matchedNew := -1 - for idx, n := range nw { - if diffs, _ := compareJobContainerStatusesNewStyle(&d, &n, dcl.FieldName{}); len(diffs) == 0 { - matchedNew = idx - break - } - } - if matchedNew != -1 { - reorderedNew = append(reorderedNew, nw[matchedNew]) - nw = append(nw[:matchedNew], nw[matchedNew+1:]...) - } - } - reorderedNew = append(reorderedNew, nw...) - - return reorderedNew -} - -func canonicalizeNewJobContainerStatusesSlice(c *Client, des, nw []JobContainerStatuses) []JobContainerStatuses { - if des == nil { - return nw - } - - // Lengths are unequal. A diff will occur later, so we shouldn't canonicalize. - // Return the original array. - if len(des) != len(nw) { - return nw - } - - var items []JobContainerStatuses - for i, d := range des { - n := nw[i] - items = append(items, *canonicalizeNewJobContainerStatuses(c, &d, &n)) - } - - return items -} - // The differ returns a list of diffs, along with a list of operations that should be taken // to remedy them. Right now, it does not attempt to consolidate operations - if several // fields can be fixed with a patch update, it will perform the patch several times. @@ -3759,13 +3595,6 @@ func diffJob(c *Client, desired, actual *Job, opts ...dcl.ApplyOption) ([]*dcl.F newDiffs = append(newDiffs, ds...) } - if ds, err := dcl.Diff(desired.ContainerStatuses, actual.ContainerStatuses, dcl.Info{OutputOnly: true, ObjectFunction: compareJobContainerStatusesNewStyle, EmptyObject: EmptyJobContainerStatuses, OperationSelector: dcl.RequiresRecreate()}, fn.AddNest("ContainerStatuses")); len(ds) != 0 || err != nil { - if err != nil { - return nil, err - } - newDiffs = append(newDiffs, ds...) - } - if ds, err := dcl.Diff(desired.Etag, actual.Etag, dcl.Info{OutputOnly: true, OperationSelector: dcl.RequiresRecreate()}, fn.AddNest("Etag")); len(ds) != 0 || err != nil { if err != nil { return nil, err @@ -4602,20 +4431,6 @@ func compareJobConditionsNewStyle(d, a interface{}, fn dcl.FieldName) ([]*dcl.Fi diffs = append(diffs, ds...) } - if ds, err := dcl.Diff(desired.InternalReason, actual.InternalReason, dcl.Info{Type: "EnumType", OperationSelector: dcl.TriggersOperation("updateJobUpdateJobOperation")}, fn.AddNest("InternalReason")); len(ds) != 0 || err != nil { - if err != nil { - return nil, err - } - diffs = append(diffs, ds...) - } - - if ds, err := dcl.Diff(desired.DomainMappingReason, actual.DomainMappingReason, dcl.Info{Type: "EnumType", OperationSelector: dcl.TriggersOperation("updateJobUpdateJobOperation")}, fn.AddNest("DomainMappingReason")); len(ds) != 0 || err != nil { - if err != nil { - return nil, err - } - diffs = append(diffs, ds...) - } - if ds, err := dcl.Diff(desired.RevisionReason, actual.RevisionReason, dcl.Info{Type: "EnumType", OperationSelector: dcl.TriggersOperation("updateJobUpdateJobOperation")}, fn.AddNest("RevisionReason")); len(ds) != 0 || err != nil { if err != nil { return nil, err @@ -4704,42 +4519,6 @@ func compareJobLatestCreatedExecutionNewStyle(d, a interface{}, fn dcl.FieldName return diffs, nil } -func compareJobContainerStatusesNewStyle(d, a interface{}, fn dcl.FieldName) ([]*dcl.FieldDiff, error) { - var diffs []*dcl.FieldDiff - - desired, ok := d.(*JobContainerStatuses) - if !ok { - desiredNotPointer, ok := d.(JobContainerStatuses) - if !ok { - return nil, fmt.Errorf("obj %v is not a JobContainerStatuses or *JobContainerStatuses", d) - } - desired = &desiredNotPointer - } - actual, ok := a.(*JobContainerStatuses) - if !ok { - actualNotPointer, ok := a.(JobContainerStatuses) - if !ok { - return nil, fmt.Errorf("obj %v is not a JobContainerStatuses", a) - } - actual = &actualNotPointer - } - - if ds, err := dcl.Diff(desired.Name, actual.Name, dcl.Info{OperationSelector: dcl.TriggersOperation("updateJobUpdateJobOperation")}, fn.AddNest("Name")); len(ds) != 0 || err != nil { - if err != nil { - return nil, err - } - diffs = append(diffs, ds...) - } - - if ds, err := dcl.Diff(desired.ImageDigest, actual.ImageDigest, dcl.Info{OperationSelector: dcl.TriggersOperation("updateJobUpdateJobOperation")}, fn.AddNest("ImageDigest")); len(ds) != 0 || err != nil { - if err != nil { - return nil, err - } - diffs = append(diffs, ds...) - } - return diffs, nil -} - // urlNormalized returns a copy of the resource struct with values normalized // for URL substitutions. For instance, it converts long-form self-links to // short-form so they can be substituted in. @@ -4883,7 +4662,6 @@ func flattenJob(c *Client, i interface{}, res *Job) *Job { resultRes.LatestSucceededExecution = flattenJobLatestSucceededExecution(c, m["latestSucceededExecution"], res) resultRes.LatestCreatedExecution = flattenJobLatestCreatedExecution(c, m["latestCreatedExecution"], res) resultRes.Reconciling = dcl.FlattenBool(m["reconciling"]) - resultRes.ContainerStatuses = flattenJobContainerStatusesSlice(c, m["containerStatuses"], res) resultRes.Etag = dcl.FlattenString(m["etag"]) resultRes.Project = dcl.FlattenString(m["project"]) resultRes.Location = dcl.FlattenString(m["location"]) @@ -7012,12 +6790,6 @@ func expandJobConditions(c *Client, f *JobConditions, res *Job) (map[string]inte if v := f.Reason; !dcl.IsEmptyValueIndirect(v) { m["reason"] = v } - if v := f.InternalReason; !dcl.IsEmptyValueIndirect(v) { - m["internalReason"] = v - } - if v := f.DomainMappingReason; !dcl.IsEmptyValueIndirect(v) { - m["domainMappingReason"] = v - } if v := f.RevisionReason; !dcl.IsEmptyValueIndirect(v) { m["revisionReason"] = v } @@ -7047,8 +6819,6 @@ func flattenJobConditions(c *Client, i interface{}, res *Job) *JobConditions { r.LastTransitionTime = dcl.FlattenString(m["lastTransitionTime"]) r.Severity = flattenJobConditionsSeverityEnum(m["severity"]) r.Reason = flattenJobConditionsReasonEnum(m["reason"]) - r.InternalReason = flattenJobConditionsInternalReasonEnum(m["internalReason"]) - r.DomainMappingReason = flattenJobConditionsDomainMappingReasonEnum(m["domainMappingReason"]) r.RevisionReason = flattenJobConditionsRevisionReasonEnum(m["revisionReason"]) r.ExecutionReason = flattenJobConditionsExecutionReasonEnum(m["executionReason"]) @@ -7291,124 +7061,6 @@ func flattenJobLatestCreatedExecution(c *Client, i interface{}, res *Job) *JobLa return r } -// expandJobContainerStatusesMap expands the contents of JobContainerStatuses into a JSON -// request object. -func expandJobContainerStatusesMap(c *Client, f map[string]JobContainerStatuses, res *Job) (map[string]interface{}, error) { - if f == nil { - return nil, nil - } - - items := make(map[string]interface{}) - for k, item := range f { - i, err := expandJobContainerStatuses(c, &item, res) - if err != nil { - return nil, err - } - if i != nil { - items[k] = i - } - } - - return items, nil -} - -// expandJobContainerStatusesSlice expands the contents of JobContainerStatuses into a JSON -// request object. -func expandJobContainerStatusesSlice(c *Client, f []JobContainerStatuses, res *Job) ([]map[string]interface{}, error) { - if f == nil { - return nil, nil - } - - items := []map[string]interface{}{} - for _, item := range f { - i, err := expandJobContainerStatuses(c, &item, res) - if err != nil { - return nil, err - } - - items = append(items, i) - } - - return items, nil -} - -// flattenJobContainerStatusesMap flattens the contents of JobContainerStatuses from a JSON -// response object. -func flattenJobContainerStatusesMap(c *Client, i interface{}, res *Job) map[string]JobContainerStatuses { - a, ok := i.(map[string]interface{}) - if !ok { - return map[string]JobContainerStatuses{} - } - - if len(a) == 0 { - return map[string]JobContainerStatuses{} - } - - items := make(map[string]JobContainerStatuses) - for k, item := range a { - items[k] = *flattenJobContainerStatuses(c, item.(map[string]interface{}), res) - } - - return items -} - -// flattenJobContainerStatusesSlice flattens the contents of JobContainerStatuses from a JSON -// response object. -func flattenJobContainerStatusesSlice(c *Client, i interface{}, res *Job) []JobContainerStatuses { - a, ok := i.([]interface{}) - if !ok { - return []JobContainerStatuses{} - } - - if len(a) == 0 { - return []JobContainerStatuses{} - } - - items := make([]JobContainerStatuses, 0, len(a)) - for _, item := range a { - items = append(items, *flattenJobContainerStatuses(c, item.(map[string]interface{}), res)) - } - - return items -} - -// expandJobContainerStatuses expands an instance of JobContainerStatuses into a JSON -// request object. -func expandJobContainerStatuses(c *Client, f *JobContainerStatuses, res *Job) (map[string]interface{}, error) { - if dcl.IsEmptyValueIndirect(f) { - return nil, nil - } - - m := make(map[string]interface{}) - if v := f.Name; !dcl.IsEmptyValueIndirect(v) { - m["name"] = v - } - if v := f.ImageDigest; !dcl.IsEmptyValueIndirect(v) { - m["imageDigest"] = v - } - - return m, nil -} - -// flattenJobContainerStatuses flattens an instance of JobContainerStatuses from a JSON -// response object. -func flattenJobContainerStatuses(c *Client, i interface{}, res *Job) *JobContainerStatuses { - m, ok := i.(map[string]interface{}) - if !ok { - return nil - } - - r := &JobContainerStatuses{} - - if dcl.IsEmptyValueIndirect(i) { - return EmptyJobContainerStatuses - } - r.Name = dcl.FlattenString(m["name"]) - r.ImageDigest = dcl.FlattenString(m["imageDigest"]) - - return r -} - // flattenJobLaunchStageEnumMap flattens the contents of JobLaunchStageEnum from a JSON // response object. func flattenJobLaunchStageEnumMap(c *Client, i interface{}, res *Job) map[string]JobLaunchStageEnum { @@ -8072,108 +7724,6 @@ func flattenJobConditionsReasonEnum(i interface{}) *JobConditionsReasonEnum { return JobConditionsReasonEnumRef(s) } -// flattenJobConditionsInternalReasonEnumMap flattens the contents of JobConditionsInternalReasonEnum from a JSON -// response object. -func flattenJobConditionsInternalReasonEnumMap(c *Client, i interface{}, res *Job) map[string]JobConditionsInternalReasonEnum { - a, ok := i.(map[string]interface{}) - if !ok { - return map[string]JobConditionsInternalReasonEnum{} - } - - if len(a) == 0 { - return map[string]JobConditionsInternalReasonEnum{} - } - - items := make(map[string]JobConditionsInternalReasonEnum) - for k, item := range a { - items[k] = *flattenJobConditionsInternalReasonEnum(item.(interface{})) - } - - return items -} - -// flattenJobConditionsInternalReasonEnumSlice flattens the contents of JobConditionsInternalReasonEnum from a JSON -// response object. -func flattenJobConditionsInternalReasonEnumSlice(c *Client, i interface{}, res *Job) []JobConditionsInternalReasonEnum { - a, ok := i.([]interface{}) - if !ok { - return []JobConditionsInternalReasonEnum{} - } - - if len(a) == 0 { - return []JobConditionsInternalReasonEnum{} - } - - items := make([]JobConditionsInternalReasonEnum, 0, len(a)) - for _, item := range a { - items = append(items, *flattenJobConditionsInternalReasonEnum(item.(interface{}))) - } - - return items -} - -// flattenJobConditionsInternalReasonEnum asserts that an interface is a string, and returns a -// pointer to a *JobConditionsInternalReasonEnum with the same value as that string. -func flattenJobConditionsInternalReasonEnum(i interface{}) *JobConditionsInternalReasonEnum { - s, ok := i.(string) - if !ok { - return nil - } - - return JobConditionsInternalReasonEnumRef(s) -} - -// flattenJobConditionsDomainMappingReasonEnumMap flattens the contents of JobConditionsDomainMappingReasonEnum from a JSON -// response object. -func flattenJobConditionsDomainMappingReasonEnumMap(c *Client, i interface{}, res *Job) map[string]JobConditionsDomainMappingReasonEnum { - a, ok := i.(map[string]interface{}) - if !ok { - return map[string]JobConditionsDomainMappingReasonEnum{} - } - - if len(a) == 0 { - return map[string]JobConditionsDomainMappingReasonEnum{} - } - - items := make(map[string]JobConditionsDomainMappingReasonEnum) - for k, item := range a { - items[k] = *flattenJobConditionsDomainMappingReasonEnum(item.(interface{})) - } - - return items -} - -// flattenJobConditionsDomainMappingReasonEnumSlice flattens the contents of JobConditionsDomainMappingReasonEnum from a JSON -// response object. -func flattenJobConditionsDomainMappingReasonEnumSlice(c *Client, i interface{}, res *Job) []JobConditionsDomainMappingReasonEnum { - a, ok := i.([]interface{}) - if !ok { - return []JobConditionsDomainMappingReasonEnum{} - } - - if len(a) == 0 { - return []JobConditionsDomainMappingReasonEnum{} - } - - items := make([]JobConditionsDomainMappingReasonEnum, 0, len(a)) - for _, item := range a { - items = append(items, *flattenJobConditionsDomainMappingReasonEnum(item.(interface{}))) - } - - return items -} - -// flattenJobConditionsDomainMappingReasonEnum asserts that an interface is a string, and returns a -// pointer to a *JobConditionsDomainMappingReasonEnum with the same value as that string. -func flattenJobConditionsDomainMappingReasonEnum(i interface{}) *JobConditionsDomainMappingReasonEnum { - s, ok := i.(string) - if !ok { - return nil - } - - return JobConditionsDomainMappingReasonEnumRef(s) -} - // flattenJobConditionsRevisionReasonEnumMap flattens the contents of JobConditionsRevisionReasonEnum from a JSON // response object. func flattenJobConditionsRevisionReasonEnumMap(c *Client, i interface{}, res *Job) map[string]JobConditionsRevisionReasonEnum { @@ -8559,9 +8109,6 @@ func extractJobLatestSucceededExecutionFields(r *Job, o *JobLatestSucceededExecu func extractJobLatestCreatedExecutionFields(r *Job, o *JobLatestCreatedExecution) error { return nil } -func extractJobContainerStatusesFields(r *Job, o *JobContainerStatuses) error { - return nil -} func postReadExtractJobFields(r *Job) error { vBinaryAuthorization := r.BinaryAuthorization @@ -8755,6 +8302,3 @@ func postReadExtractJobLatestSucceededExecutionFields(r *Job, o *JobLatestSuccee func postReadExtractJobLatestCreatedExecutionFields(r *Job, o *JobLatestCreatedExecution) error { return nil } -func postReadExtractJobContainerStatusesFields(r *Job, o *JobContainerStatuses) error { - return nil -} diff --git a/unstructured/google/run/alpha/job.go b/unstructured/google/run/alpha/job.go index bca12edae..36435fa52 100755 --- a/unstructured/google/run/alpha/job.go +++ b/unstructured/google/run/alpha/job.go @@ -60,15 +60,9 @@ func JobToUnstructured(r *dclService.Job) *unstructured.Resource { var rConditions []interface{} for _, rConditionsVal := range r.Conditions { rConditionsObject := make(map[string]interface{}) - if rConditionsVal.DomainMappingReason != nil { - rConditionsObject["domainMappingReason"] = string(*rConditionsVal.DomainMappingReason) - } if rConditionsVal.ExecutionReason != nil { rConditionsObject["executionReason"] = string(*rConditionsVal.ExecutionReason) } - if rConditionsVal.InternalReason != nil { - rConditionsObject["internalReason"] = string(*rConditionsVal.InternalReason) - } if rConditionsVal.LastTransitionTime != nil { rConditionsObject["lastTransitionTime"] = *rConditionsVal.LastTransitionTime } @@ -93,18 +87,6 @@ func JobToUnstructured(r *dclService.Job) *unstructured.Resource { rConditions = append(rConditions, rConditionsObject) } u.Object["conditions"] = rConditions - var rContainerStatuses []interface{} - for _, rContainerStatusesVal := range r.ContainerStatuses { - rContainerStatusesObject := make(map[string]interface{}) - if rContainerStatusesVal.ImageDigest != nil { - rContainerStatusesObject["imageDigest"] = *rContainerStatusesVal.ImageDigest - } - if rContainerStatusesVal.Name != nil { - rContainerStatusesObject["name"] = *rContainerStatusesVal.Name - } - rContainerStatuses = append(rContainerStatuses, rContainerStatusesObject) - } - u.Object["containerStatuses"] = rContainerStatuses if r.CreateTime != nil { u.Object["createTime"] = *r.CreateTime } @@ -454,13 +436,6 @@ func UnstructuredToJob(u *unstructured.Resource) (*dclService.Job, error) { for _, o := range s { if objval, ok := o.(map[string]interface{}); ok { var rConditions dclService.JobConditions - if _, ok := objval["domainMappingReason"]; ok { - if s, ok := objval["domainMappingReason"].(string); ok { - rConditions.DomainMappingReason = dclService.JobConditionsDomainMappingReasonEnumRef(s) - } else { - return nil, fmt.Errorf("rConditions.DomainMappingReason: expected string") - } - } if _, ok := objval["executionReason"]; ok { if s, ok := objval["executionReason"].(string); ok { rConditions.ExecutionReason = dclService.JobConditionsExecutionReasonEnumRef(s) @@ -468,13 +443,6 @@ func UnstructuredToJob(u *unstructured.Resource) (*dclService.Job, error) { return nil, fmt.Errorf("rConditions.ExecutionReason: expected string") } } - if _, ok := objval["internalReason"]; ok { - if s, ok := objval["internalReason"].(string); ok { - rConditions.InternalReason = dclService.JobConditionsInternalReasonEnumRef(s) - } else { - return nil, fmt.Errorf("rConditions.InternalReason: expected string") - } - } if _, ok := objval["lastTransitionTime"]; ok { if s, ok := objval["lastTransitionTime"].(string); ok { rConditions.LastTransitionTime = dcl.String(s) @@ -531,32 +499,6 @@ func UnstructuredToJob(u *unstructured.Resource) (*dclService.Job, error) { return nil, fmt.Errorf("r.Conditions: expected []interface{}") } } - if _, ok := u.Object["containerStatuses"]; ok { - if s, ok := u.Object["containerStatuses"].([]interface{}); ok { - for _, o := range s { - if objval, ok := o.(map[string]interface{}); ok { - var rContainerStatuses dclService.JobContainerStatuses - if _, ok := objval["imageDigest"]; ok { - if s, ok := objval["imageDigest"].(string); ok { - rContainerStatuses.ImageDigest = dcl.String(s) - } else { - return nil, fmt.Errorf("rContainerStatuses.ImageDigest: expected string") - } - } - if _, ok := objval["name"]; ok { - if s, ok := objval["name"].(string); ok { - rContainerStatuses.Name = dcl.String(s) - } else { - return nil, fmt.Errorf("rContainerStatuses.Name: expected string") - } - } - r.ContainerStatuses = append(r.ContainerStatuses, rContainerStatuses) - } - } - } else { - return nil, fmt.Errorf("r.ContainerStatuses: expected []interface{}") - } - } if _, ok := u.Object["createTime"]; ok { if s, ok := u.Object["createTime"].(string); ok { r.CreateTime = dcl.String(s)