{
  "description": "IAMPolicyMember is the Schema for the iampolicies API",
  "properties": {
    "apiVersion": {
      "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
      "type": "string"
    },
    "kind": {
      "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
      "type": "string"
    },
    "metadata": {
      "type": "object"
    },
    "spec": {
      "description": "IAMPolicyMemberSpec defines the desired state of IAMPolicyMember",
      "oneOf": [
        {
          "required": [
            "member"
          ]
        },
        {
          "required": [
            "memberFrom"
          ]
        }
      ],
      "properties": {
        "condition": {
          "description": "Immutable. Optional. The condition under which the binding applies.",
          "properties": {
            "description": {
              "type": "string"
            },
            "expression": {
              "type": "string"
            },
            "title": {
              "type": "string"
            }
          },
          "required": [
            "expression",
            "title"
          ],
          "type": "object",
          "x-kubernetes-validations": [
            {
              "message": "condition is immutable",
              "rule": "self == oldSelf"
            }
          ],
          "additionalProperties": false
        },
        "member": {
          "description": "Immutable. The IAM identity to be bound to the role. Exactly one of 'member' or 'memberFrom' must be used.",
          "type": "string",
          "x-kubernetes-validations": [
            {
              "message": "member is immutable",
              "rule": "self == oldSelf"
            }
          ]
        },
        "memberFrom": {
          "description": "Immutable. The IAM identity to be bound to the role. Exactly one of 'member' or 'memberFrom' must be used, and only one subfield within 'memberFrom' can be used.",
          "oneOf": [
            {
              "required": [
                "bigQueryConnectionConnectionRef"
              ]
            },
            {
              "required": [
                "logSinkRef"
              ]
            },
            {
              "required": [
                "serviceAccountRef"
              ]
            },
            {
              "required": [
                "serviceIdentityRef"
              ]
            },
            {
              "required": [
                "sqlInstanceRef"
              ]
            }
          ],
          "properties": {
            "bigQueryConnectionConnectionRef": {
              "description": "BigQueryConnectionConnection whose service account is to be bound to the role. Use the Type field to specify the connection type. For \"spark\" connetion, the service account is in `status.observedState.spark.serviceAccountID`. For \"cloudSQL\" connection, the service account is in `status.observedState.cloudSQL.serviceAccountID`. For \"cloudResource\" connection, the service account is in `status.observedState.cloudResource.serviceAccountID`.",
              "properties": {
                "name": {
                  "type": "string"
                },
                "namespace": {
                  "type": "string"
                },
                "type": {
                  "description": "Type field specifies the connection type of the BigQueryConnectionConnection resource, whose service account is to be bound to the role.",
                  "enum": [
                    "spark",
                    "cloudSQL",
                    "cloudResource"
                  ],
                  "type": "string"
                }
              },
              "required": [
                "name",
                "type"
              ],
              "type": "object",
              "additionalProperties": false
            },
            "logSinkRef": {
              "description": "The LoggingLogSink whose writer identity (i.e. its 'status.writerIdentity') is to be bound to the role.",
              "properties": {
                "name": {
                  "type": "string"
                },
                "namespace": {
                  "type": "string"
                }
              },
              "required": [
                "name"
              ],
              "type": "object",
              "additionalProperties": false
            },
            "serviceAccountRef": {
              "description": "The IAMServiceAccount to be bound to the role.",
              "properties": {
                "name": {
                  "type": "string"
                },
                "namespace": {
                  "type": "string"
                }
              },
              "required": [
                "name"
              ],
              "type": "object",
              "additionalProperties": false
            },
            "serviceIdentityRef": {
              "description": "The ServiceIdentity whose service account (i.e., its 'status.email') is to be bound to the role.",
              "properties": {
                "name": {
                  "type": "string"
                },
                "namespace": {
                  "type": "string"
                }
              },
              "required": [
                "name"
              ],
              "type": "object",
              "additionalProperties": false
            },
            "sqlInstanceRef": {
              "description": "The SQLInstance whose service account (i.e. its 'status.serviceAccountEmailAddress') is to be bound to the role.",
              "properties": {
                "name": {
                  "type": "string"
                },
                "namespace": {
                  "type": "string"
                }
              },
              "required": [
                "name"
              ],
              "type": "object",
              "additionalProperties": false
            }
          },
          "type": "object",
          "x-kubernetes-validations": [
            {
              "message": "memberFrom is immutable",
              "rule": "self == oldSelf"
            }
          ],
          "additionalProperties": false
        },
        "resourceRef": {
          "description": "Immutable. Required. The GCP resource to set the IAM policy on (e.g. organization, project...)",
          "oneOf": [
            {
              "not": {
                "required": [
                  "external"
                ]
              },
              "required": [
                "name"
              ]
            },
            {
              "not": {
                "anyOf": [
                  {
                    "required": [
                      "name"
                    ]
                  },
                  {
                    "required": [
                      "namespace"
                    ]
                  }
                ]
              },
              "required": [
                "external"
              ]
            },
            {
              "not": {
                "anyOf": [
                  {
                    "required": [
                      "name"
                    ]
                  },
                  {
                    "required": [
                      "namespace"
                    ]
                  },
                  {
                    "required": [
                      "apiVersion"
                    ]
                  },
                  {
                    "required": [
                      "external"
                    ]
                  }
                ]
              }
            }
          ],
          "properties": {
            "apiVersion": {
              "description": "APIVersion of the referenced resource",
              "type": "string"
            },
            "external": {
              "description": "The external name of the referenced resource",
              "type": "string"
            },
            "kind": {
              "description": "Kind of the referenced resource",
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "namespace": {
              "type": "string"
            }
          },
          "required": [
            "kind"
          ],
          "type": "object",
          "x-kubernetes-validations": [
            {
              "message": "resourceRef is immutable",
              "rule": "self == oldSelf"
            }
          ],
          "additionalProperties": false
        },
        "role": {
          "description": "Immutable. Required. The role for which the Member will be bound.",
          "pattern": "^((projects|organizations)/[^/]+/)?roles/[\\w_\\.]+$",
          "type": "string",
          "x-kubernetes-validations": [
            {
              "message": "role is immutable",
              "rule": "self == oldSelf"
            }
          ]
        }
      },
      "required": [
        "resourceRef",
        "role"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "description": "IAMPolicyMemberStatus defines the observed state of IAMPolicyMember",
      "properties": {
        "conditions": {
          "description": "Conditions represent the latest available observations of the IAM policy's current state.",
          "items": {
            "properties": {
              "lastTransitionTime": {
                "description": "Last time the condition transitioned from one status to another.",
                "type": "string"
              },
              "message": {
                "description": "Human-readable message indicating details about last transition.",
                "type": "string"
              },
              "reason": {
                "description": "Unique, one-word, CamelCase reason for the condition's last transition.",
                "type": "string"
              },
              "status": {
                "description": "Status is the status of the condition. Can be True, False, Unknown.",
                "type": "string"
              },
              "type": {
                "description": "Type is the type of the condition.",
                "type": "string"
              }
            },
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "observedGeneration": {
          "description": "ObservedGeneration is the generation of the resource that was most recently observed by the Config Connector controller. If this is equal to metadata.generation, then that means that the current reported status reflects the most recent desired state of the resource.",
          "format": "int64",
          "type": "integer"
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "type": "object"
}
