Skip to content

Commit

Permalink
[EG] Container Registry required/optional (#30778)
Browse files Browse the repository at this point in the history
* regen with required/optional cr

* missed on
  • Loading branch information
l0lawrence authored Dec 13, 2024
1 parent 0a27976 commit 24319ee
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ model ContainerRegistryChartDeletedEventData

alias ContainerRegistryBaseEventData = {
/** The event ID. */
id?: string;
id: string;

/** The time at which the event occurred. */
@madeRequired(ServiceApiVersions.v2024_01_01)
timestamp: utcDateTime;

/** The action that encompasses the provided event. */
action?: string;
action: string;

/** The location of the event. */
location?: string;
location: string;
};

/** The content of the event request message. */
Expand All @@ -46,16 +46,16 @@ model ContainerRegistryEventData {
target: ContainerRegistryEventTarget;

/** The request that generated the event. */
request: ContainerRegistryEventRequest;
request?: ContainerRegistryEventRequest;

/** The agent that initiated the event. For most situations, this could be from the authorization context of the request. */
actor: ContainerRegistryEventActor;
actor?: ContainerRegistryEventActor;

/** The registry node that generated the event. Put differently, while the actor initiates the event, the source generates it. */
source: ContainerRegistryEventSource;
source?: ContainerRegistryEventSource;

/** The connected registry information if the event is generated by a connected registry. */
connectedRegistry: ContainerRegistryEventConnectedRegistry;
connectedRegistry?: ContainerRegistryEventConnectedRegistry;
}

/** The content of the event request message. */
Expand All @@ -66,13 +66,13 @@ model ContainerRegistryArtifactEventData {
target: ContainerRegistryArtifactEventTarget;

/** The connected registry information if the event is generated by a connected registry. */
connectedRegistry: ContainerRegistryEventConnectedRegistry;
connectedRegistry?: ContainerRegistryEventConnectedRegistry;
}

/** The target of the event. */
model ContainerRegistryEventTarget {
/** The MIME type of the referenced object. */
mediaType?: string;
mediaType: string;

/** The number of bytes of the content. Same as Length field. */
size?: int64;
Expand All @@ -84,7 +84,7 @@ model ContainerRegistryEventTarget {
length?: int64;

/** The repository name. */
repository?: string;
repository: string;

/** The direct URL to the content. */
url?: string;
Expand Down Expand Up @@ -113,16 +113,16 @@ model ContainerRegistryArtifactEventTarget {
/** The request that generated the event. */
model ContainerRegistryEventRequest {
/** The ID of the request that initiated the event. */
id?: string;
id: string;

/** The IP or hostname and possibly port of the client connection that initiated the event. This is the RemoteAddr from the standard http request. */
addr?: string;

/** The externally accessible hostname of the registry instance, as specified by the http host header on incoming requests. */
host?: string;
host: string;

/** The request method that generated the event. */
method?: string;
method: string;

/** The user agent header of the request. */
useragent?: string;
Expand All @@ -147,7 +147,7 @@ model ContainerRegistryEventSource {
/** The connected registry information if the event is generated by a connected registry. */
model ContainerRegistryEventConnectedRegistry {
/** The name of the connected registry that generated this event. */
name?: string;
name: string;
}

alias ContainerRegistryBaseEventTarget<
Expand All @@ -158,7 +158,7 @@ alias ContainerRegistryBaseEventTarget<
Ttag extends valueof string
> = {
@doc(TmediaType)
mediaType?: string;
mediaType: string;

@doc(Tsize)
size?: int64;
Expand All @@ -167,7 +167,7 @@ alias ContainerRegistryBaseEventTarget<
digest?: string;

@doc(Trepository)
repository?: string;
repository: string;

@doc(Ttag)
tag?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3353,8 +3353,10 @@
}
},
"required": [
"target",
"connectedRegistry"
"id",
"action",
"location",
"target"
]
},
"ContainerRegistryArtifactEventTarget": {
Expand Down Expand Up @@ -3390,7 +3392,11 @@
"type": "string",
"description": "The version of the artifact."
}
}
},
"required": [
"mediaType",
"repository"
]
},
"ContainerRegistryChartDeletedEventData": {
"type": "object",
Expand Down Expand Up @@ -3428,7 +3434,10 @@
"type": "string",
"description": "The name of the connected registry that generated this event."
}
}
},
"required": [
"name"
]
},
"ContainerRegistryEventData": {
"type": "object",
Expand Down Expand Up @@ -3473,11 +3482,10 @@
}
},
"required": [
"target",
"request",
"actor",
"source",
"connectedRegistry"
"id",
"action",
"location",
"target"
]
},
"ContainerRegistryEventRequest": {
Expand All @@ -3504,7 +3512,12 @@
"type": "string",
"description": "The user agent header of the request."
}
}
},
"required": [
"id",
"host",
"method"
]
},
"ContainerRegistryEventSource": {
"type": "object",
Expand Down Expand Up @@ -3554,7 +3567,11 @@
"type": "string",
"description": "The tag name."
}
}
},
"required": [
"mediaType",
"repository"
]
},
"ContainerRegistryImageDeletedEventData": {
"type": "object",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3418,9 +3418,11 @@
}
},
"required": [
"id",
"timestamp",
"target",
"connectedRegistry"
"action",
"location",
"target"
]
},
"ContainerRegistryArtifactEventTarget": {
Expand Down Expand Up @@ -3456,7 +3458,11 @@
"type": "string",
"description": "The version of the artifact."
}
}
},
"required": [
"mediaType",
"repository"
]
},
"ContainerRegistryChartDeletedEventData": {
"type": "object",
Expand Down Expand Up @@ -3494,7 +3500,10 @@
"type": "string",
"description": "The name of the connected registry that generated this event."
}
}
},
"required": [
"name"
]
},
"ContainerRegistryEventData": {
"type": "object",
Expand Down Expand Up @@ -3539,12 +3548,11 @@
}
},
"required": [
"id",
"timestamp",
"target",
"request",
"actor",
"source",
"connectedRegistry"
"action",
"location",
"target"
]
},
"ContainerRegistryEventRequest": {
Expand All @@ -3571,7 +3579,12 @@
"type": "string",
"description": "The user agent header of the request."
}
}
},
"required": [
"id",
"host",
"method"
]
},
"ContainerRegistryEventSource": {
"type": "object",
Expand Down Expand Up @@ -3621,7 +3634,11 @@
"type": "string",
"description": "The tag name."
}
}
},
"required": [
"mediaType",
"repository"
]
},
"ContainerRegistryImageDeletedEventData": {
"type": "object",
Expand Down

0 comments on commit 24319ee

Please sign in to comment.