  versions: Optional. All versions of this `WasmPlugin` resource in the key-
      value format. The key is the resource ID, and the value is the
      `VersionDetails` object. Lets you create or update a `WasmPlugin`
      resource and its versions in a single request. When the
      `main_version_id` field is not empty, it must point to one of the
      `VersionDetails` objects in the map. If provided in a `PATCH` request,
      the new versions replace the previous set. Any version omitted from the
      `versions` field is removed. Because the `WasmPluginVersion` resource is
      immutable, if a `WasmPluginVersion` resource with the same name already
      exists and differs, the request fails. Note: In a `GET` request, this
      field is populated only if the field `GetWasmPluginRequest.view` is set
      to `WASM_PLUGIN_VIEW_FULL`.
  """

  @encoding.MapUnrecognizedFields('additionalProperties')
  class LabelsValue(_messages.Message):
    r"""Optional. Set of labels associated with the `WasmPlugin` resource. The
    format must comply with [the following
    requirements](/compute/docs/labeling-resources#requirements).

    Messages:
      AdditionalProperty: An additional property for a LabelsValue object.

    Fields:
      additionalProperties: Additional properties of type LabelsValue
    """

    class AdditionalProperty(_messages.Message):
      r"""An additional property for a LabelsValue object.

      Fields:
        key: Name of the additional property.
        value: A string attribute.
      """

      key = _messages.StringField(1)
      value = _messages.StringField(2)

    additionalProperties = _messages.MessageField('AdditionalProperty', 1, repeated=True)

  @encoding.MapUnrecognizedFields('additionalProperties')
  class VersionsValue(_messages.Message):
    r"""Optional. All versions of this `WasmPlugin` resource in the key-value
    format. The key is the resource ID, and the value is the `VersionDetails`
    object. Lets you create or update a `WasmPlugin` resource and its versions
    in a single request. When the `main_version_id` field is not empty, it
    must point to one of the `VersionDetails` objects in the map. If provided
    in a `PATCH` request, the new versions replace the previous set. Any
    version omitted from the `versions` field is removed. Because the
    `WasmPluginVersion` resource is immutable, if a `WasmPluginVersion`
    resource with the same name already exists and differs, the request fails.
    Note: In a `GET` request, this field is populated only if the field
    `GetWasmPluginRequest.view` is set to `WASM_PLUGIN_VIEW_FULL`.

    Messages:
      AdditionalProperty: An additional property for a VersionsValue object.

    Fields:
      additionalProperties: Additional properties of type VersionsValue
    """

    class AdditionalProperty(_messages.Message):
      r"""An additional property for a VersionsValue object.

      Fields:
        key: Name of the additional property.
        value: A WasmPluginVersionDetails attribute.
      """

      key = _messages.StringField(1)
      value = _messages.MessageField('WasmPluginVersionDetails', 2)

    additionalProperties = _messages.MessageField('AdditionalProperty', 1, repeated=True)

  createTime = _messages.StringField(1)
  description = _messages.StringField(2)
  labels = _messages.MessageField('LabelsValue', 3)
  logConfig = _messages.MessageField('WasmPluginLogConfig', 4)
  mainVersionId = _messages.StringField(5)
  name = _messages.StringField(6)
  updateTime = _messages.StringField(7)
  usedBy = _messages.MessageField('WasmPluginUsedBy', 8, repeated=True)
  versions = _messages.MessageField('VersionsValue', 9)


class WasmPluginLogConfig(_messages.Message):
  r"""Specifies the logging options for the activity performed by this plugin.
  If logging is enabled, plugin logs are exported to Cloud Logging.

  Enums:
    MinLogLevelValueValuesEnum: Non-empty default. Specifies the lowest level
      of the plugin logs that are exported to Cloud Logging. This setting
      relates to the logs generated by using logging statements in your Wasm
      code. This field is can be set only if logging is enabled for the
      plugin. If the field is not provided when logging is enabled, it is set
      to `INFO` by default.

  Fields:
    enable: Optional. Specifies whether to enable logging for activity by this
      plugin. Defaults to `false`.
    minLogLevel: Non-empty default. Specifies the lowest level of the plugin
      logs that are exported to Cloud Logging. This setting relates to the
      logs generated by using logging statements in your Wasm code. This field
      is can be set only if logging is enabled for the plugin. If the field is
      not provided when logging is enabled, it is set to `INFO` by default.
    sampleRate: Non-empty default. Configures the sampling rate of activity
      logs, where `1.0` means all logged activity is reported and `0.0` means
      no activity is reported. A floating point value between `0.0` and `1.0`
      indicates that a percentage of log messages is stored. The default value
      when logging is enabled is `1.0`. The value of the field must be between
      `0` and `1` (inclusive). This field can be specified only if logging is
      enabled for this plugin.
  """

  class MinLogLevelValueValuesEnum(_messages.Enum):
    r"""Non-empty default. Specifies the lowest level of the plugin logs that
    are exported to Cloud Logging. This setting relates to the logs generated
    by using logging statements in your Wasm code. This field is can be set
    only if logging is enabled for the plugin. If the field is not provided
    when logging is enabled, it is set to `INFO` by default.

    Values:
      LOG_LEVEL_UNSPECIFIED: Unspecified value. Defaults to `LogLevel.INFO`.
      TRACE: Report logs with TRACE level and above.
      DEBUG: Report logs with DEBUG level and above.
      INFO: Report logs with INFO level and above.
      WARN: Report logs with WARN level and above.
      ERROR: Report logs with ERROR level and above.
      CRITICAL: Report logs with CRITICAL level only.
    """
    LOG_LEVEL_UNSPECIFIED = 0
    TRACE = 1
    DEBUG = 2
    INFO = 3
    WARN = 4
    ERROR = 5
    CRITICAL = 6

  enable = _messages.BooleanField(1)
  minLogLevel = _messages.EnumField('MinLogLevelValueValuesEnum', 2)
  sampleRate = _messages.FloatField(3, variant=_messages.Variant.FLOAT)


class WasmPluginUsedBy(_messages.Message):
  r"""Defines a resource that uses the `WasmPlugin` resource.

  Fields:
    name: Output only. Full name of the resource
      https://google.aip.dev/122#full-resource-names, for example `//networkse
      rvices.googleapis.com/projects/{project}/locations/{location}/lbRouteExt
      ensions/{extension}`
  """

  name = _messages.StringField(1)


class WasmPluginVersion(_messages.Message):
  r"""A single immutable version of a `WasmPlugin` resource. Defines the Wasm
  module used and optionally its runtime config.

  Messages:
    LabelsValue: Optional. Set of labels associated with the
      `WasmPluginVersion` resource.

  Fields:
    createTime: Output only. The timestamp when the resource was created.
    description: Optional. A human-readable description of the resource.
    imageDigest: Output only. This field holds the digest (usually checksum)
      value for the plugin image. The value is calculated based on the
      `image_uri` field. If the `image_uri` field refers to a container image,
      the digest value is obtained from the container image. If the
      `image_uri` field refers to a generic artifact, the digest value is
      calculated based on the contents of the file.
    imageUri: Optional. URI of the image containing the Wasm module, stored in
      Artifact Registry. The URI can refer to one of the following repository
      formats: * Container images: the `image_uri` must point to a container
      that contains a single file with the name `plugin.wasm`. When a new
      `WasmPluginVersion` resource is created, the digest of the image is
      saved in the `image_digest` field. When pulling a container image from
      Artifact Registry, the digest value is used instead of an image tag. *
      Generic artifacts: the `image_uri` must be in this format:
      `projects/{project}/locations/{location}/repositories/{repository}/
      genericArtifacts/{package}:{version}`. The specified package and version
      must contain a file with the name `plugin.wasm`. When a new
      `WasmPluginVersion` resource is created, the checksum of the contents of
      the file is saved in the `image_digest` field.
    labels: Optional. Set of labels associated with the `WasmPluginVersion`
      resource.
    name: Identifier. Name of the `WasmPluginVersion` resource in the
      following format:
      `projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}/
      versions/{wasm_plugin_version}`.
    pluginConfigData: Configuration for the plugin. The configuration is
      provided to the plugin at runtime through the `ON_CONFIGURE` callback.
      When a new `WasmPluginVersion` resource is created, the digest of the
      contents is saved in the `plugin_config_digest` field.
    pluginConfigDigest: Output only. This field holds the digest (usually
      checksum) value for the plugin configuration. The value is calculated
      based on the contents of `plugin_config_data` field or the image defined
      by the `plugin_config_uri` field.
    pluginConfigUri: URI of the plugin configuration stored in the Artifact
      Registry. The configuration is provided to the plugin at runtime through
      the `ON_CONFIGURE` callback. The URI can refer to one of the following
      repository formats: * Container images: the `plugin_config_uri` must
      point to a container that contains a single file with the name
      `plugin.config`. When a new `WasmPluginVersion` resource is created, the
      digest of the image is saved in the `plugin_config_digest` field. When
      pulling a container image from Artifact Registry, the digest value is
      used instead of an image tag. * Generic artifacts: the
      `plugin_config_uri` must be in this format:
      `projects/{project}/locations/{location}/repositories/{repository}/
      genericArtifacts/{package}:{version}`. The specified package and version
      must contain a file with the name `plugin.config`. When a new
      `WasmPluginVersion` resource is created, the checksum of the contents of
      the file is saved in the `plugin_config_digest` field.
    updateTime: Output only. The timestamp when the resource was updated.
  """

  @encoding.MapUnrecognizedFields('additionalProperties')
  class LabelsValue(_messages.Message):
    r"""Optional. Set of labels associated with the `WasmPluginVersion`
    resource.

    Messages:
      AdditionalProperty: An additional property for a LabelsValue object.

    Fields:
      additionalProperties: Additional properties of type LabelsValue
    """

    class AdditionalProperty(_messages.Message):
      r"""An additional property for a LabelsValue object.

      Fields:
        key: Name of the additional property.
        value: A string attribute.
      """

      key = _messages.StringField(1)
      value = _messages.StringField(2)

    additionalProperties = _messages.MessageField('AdditionalProperty', 1, repeated=True)

  createTime = _messages.StringField(1)
  description = _messages.StringField(2)
  imageDigest = _messages.StringField(3)
  imageUri = _messages.StringField(4)
  labels = _messages.MessageField('LabelsValue', 5)
  name = _messages.StringField(6)
  pluginConfigData = _messages.BytesField(7)
  pluginConfigDigest = _messages.StringField(8)
  pluginConfigUri = _messages.StringField(9)
  updateTime = _messages.StringField(10)


class WasmPluginVersionDetails(_messages.Message):
  r"""Details of a `WasmPluginVersion` resource to be inlined in the
  `WasmPlugin` resource.

  Messages:
    LabelsValue: Optional. Set of labels associated with the
      `WasmPluginVersion` resource.

  Fields:
    createTime: Output only. The timestamp when the resource was created.
    description: Optional. A human-readable description of the resource.
    imageDigest: Output only. This field holds the digest (usually checksum)
      value for the plugin image. The value is calculated based on the
      `image_uri` field. If the `image_uri` field refers to a container image,
      the digest value is obtained from the container image. If the
      `image_uri` field refers to a generic artifact, the digest value is
      calculated based on the contents of the file.
    imageUri: Optional. URI of the image containing the Wasm module, stored in
      Artifact Registry. The URI can refer to one of the following repository
      formats: * Container images: the `image_uri` must point to a container
      that contains a single file with the name `plugin.wasm`. When a new
      `WasmPluginVersion` resource is created, the digest of the image is
      saved in the `image_digest` field. When pulling a container image from
      Artifact Registry, the digest value is used instead of an image tag. *
      Generic artifacts: the `image_uri` must be in this format:
      `projects/{project}/locations/{location}/repositories/{repository}/
      genericArtifacts/{package}:{version}`. The specified package and version
      must contain a file with the name `plugin.wasm`. When a new
      `WasmPluginVersion` resource is created, the checksum of the contents of
      the file is saved in the `image_digest` field.
    labels: Optional. Set of labels associated with the `WasmPluginVersion`
      resource.
    pluginConfigData: Configuration for the plugin. The configuration is
      provided to the plugin at runtime through the `ON_CONFIGURE` callback.
      When a new `WasmPluginVersion` version is created, the digest of the
      contents is saved in the `plugin_config_digest` field.
    pluginConfigDigest: Output only. This field holds the digest (usually
      checksum) value for the plugin configuration. The value is calculated
      based on the contents of `plugin_config_data` field or the image defined
      by the `plugin_config_uri` field.
    pluginConfigUri: URI of the plugin configuration stored in the Artifact
      Registry. The configuration is provided to the plugin at runtime through
      the `ON_CONFIGURE` callback. The URI can refer to one of the following
      repository formats: * Container images: the `plugin_config_uri` must
      point to a container that contains a single file with the name
      `plugin.config`. When a new `WasmPluginVersion` resource is created, the
      digest of the image is saved in the `plugin_config_digest` field. When
      pulling a container image from Artifact Registry, the digest value is
      used instead of an image tag. * Generic artifacts: the
      `plugin_config_uri` must be in this format:
      `projects/{project}/locations/{location}/repositories/{repository}/
      genericArtifacts/{package}:{version}`. The specified package and version
      must contain a file with the name `plugin.config`. When a new
      `WasmPluginVersion` resource is created, the checksum of the contents of
      the file is saved in the `plugin_config_digest` field.
    updateTime: Output only. The timestamp when the resource was updated.
  """

  @encoding.MapUnrecognizedFields('additionalProperties')
  class LabelsValue(_messages.Message):
    r"""Optional. Set of labels associated with the `WasmPluginVersion`
    resource.

    Messages:
      AdditionalProperty: An additional property for a LabelsValue object.

    Fields:
      additionalProperties: Additional properties of type LabelsValue
    """

    class AdditionalProperty(_messages.Message):
      r"""An additional property for a LabelsValue object.

      Fields:
        key: Name of the additional property.
        value: A string attribute.
      """

      key = _messages.StringField(1)
      value = _messages.StringField(2)

    additionalProperties = _messages.MessageField('AdditionalProperty', 1, repeated=True)

  createTime = _messages.StringField(1)
  description = _messages.StringField(2)
  imageDigest = _messages.StringField(3)
  imageUri = _messages.StringField(4)
  labels = _messages.MessageField('LabelsValue', 5)
  pluginConfigData = _messages.BytesField(6)
  pluginConfigDigest = _messages.StringField(7)
  pluginConfigUri = _messages.StringField(8)
  updateTime = _messages.StringField(9)


encoding.AddCustomJsonFieldMapping(
    StandardQueryParameters, 'f__xgafv', '$.xgafv')
encoding.AddCustomJsonEnumMapping(
    StandardQueryParameters.FXgafvValueValuesEnum, '_1', '1')
encoding.AddCustomJsonEnumMapping(
    StandardQueryParameters.FXgafvValueValuesEnum, '_2', '2')
encoding.AddCustomJsonFieldMapping(
    NetworkservicesProjectsLocationsEdgeCacheKeysetsGetIamPolicyRequest, 'options_requestedPolicyVersion', 'options.requestedPolicyVersion')
encoding.AddCustomJsonFieldMapping(
    NetworkservicesProjectsLocationsEdgeCacheOriginsGetIamPolicyRequest, 'options_requestedPolicyVersion', 'options.requestedPolicyVersion')
encoding.AddCustomJsonFieldMapping(
    NetworkservicesProjectsLocationsEdgeCacheServicesGetIamPolicyRequest, 'options_requestedPolicyVersion', 'options.requestedPolicyVersion')
