diff --git a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_networkconnectivityserviceconnectionpolicies.networkconnectivity.cnrm.cloud.google.com.yaml b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_networkconnectivityserviceconnectionpolicies.networkconnectivity.cnrm.cloud.google.com.yaml new file mode 100644 index 0000000000..3cb9231c34 --- /dev/null +++ b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_networkconnectivityserviceconnectionpolicies.networkconnectivity.cnrm.cloud.google.com.yaml @@ -0,0 +1,308 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + cnrm.cloud.google.com/version: 0.0.0-dev + creationTimestamp: null + labels: + cnrm.cloud.google.com/managed-by-kcc: "true" + cnrm.cloud.google.com/system: "true" + name: networkconnectivityserviceconnectionpolicies.networkconnectivity.cnrm.cloud.google.com +spec: + group: networkconnectivity.cnrm.cloud.google.com + names: + kind: NetworkConnectivityServiceConnectionPolicy + listKind: NetworkConnectivityServiceConnectionPolicyList + plural: networkconnectivityserviceconnectionpolicies + singular: networkconnectivityserviceconnectionpolicy + preserveUnknownFields: false + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: When 'True', the most recent reconcile of the resource succeeded + jsonPath: .status.conditions[?(@.type=='Ready')].status + name: Ready + type: string + - description: The reason for the value in 'Ready' + jsonPath: .status.conditions[?(@.type=='Ready')].reason + name: Status + type: string + - description: The last transition time for the value in 'Status' + jsonPath: .status.conditions[?(@.type=='Ready')].lastTransitionTime + name: Status Age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: NetworkConnectivityServiceConnectionPolicy is the Schema for + the NetworkConnectivityServiceConnectionPolicy 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: NetworkConnectivityServiceConnectionPolicySpec defines the + desired state of NetworkConnectivityServiceConnectionPolicy + properties: + description: + description: A description of this resource. + type: string + networkRef: + description: 'The resource path of the consumer network. Example: + - projects/{projectNumOrId}/global/networks/{resourceId}.' + oneOf: + - not: + required: + - external + required: + - name + - not: + anyOf: + - required: + - name + - required: + - namespace + required: + - external + properties: + external: + description: The compute network selflink of form "projects//global/networks/", + when not managed by KCC. + type: string + name: + description: The `name` field of a `ComputeNetwork` resource. + type: string + namespace: + description: The `namespace` field of a `ComputeNetwork` resource. + type: string + type: object + pscConfig: + description: Configuration used for Private Service Connect connections. + Used when Infrastructure is PSC. + properties: + limit: + description: Optional. Max number of PSC connections for this + policy. + format: int64 + type: integer + producerInstanceLocation: + description: Required. ProducerInstanceLocation is used to specify + which authorization mechanism to use to determine which projects + the Producer instance can be within. + type: string + subnetworkRefs: + description: 'The resource paths of subnetworks to use for IP + address management. Example: projects/{projectNumOrId}/regions/{region}/subnetworks/{resourceId}.' + items: + oneOf: + - not: + required: + - external + required: + - name + - not: + anyOf: + - required: + - name + - required: + - namespace + required: + - external + properties: + external: + description: The ComputeSubnetwork selflink of form "projects/{{project}}/regions/{{region}}/subnetworks/{{name}}", + when not managed by KCC. + type: string + name: + description: The `name` field of a `ComputeSubnetwork` resource. + type: string + namespace: + description: The `namespace` field of a `ComputeSubnetwork` + resource. + type: string + type: object + type: array + type: object + resourceID: + description: The NetworkConnectivityServiceConnectionPolicy name. + If not given, the metadata.name will be used. + type: string + serviceClass: + description: The service class identifier for which this ServiceConnectionPolicy + is for. The service class identifier is a unique, symbolic representation + of a ServiceClass. It is provided by the Service Producer. Google + services have a prefix of gcp. For example, gcp-cloud-sql. 3rd party + services do not. For example, test-service-a3dfcx. + type: string + type: object + status: + description: NetworkConnectivityServiceConnectionPolicyStatus defines + the config connector machine state of NetworkConnectivityServiceConnectionPolicy + properties: + conditions: + description: Conditions represent the latest available observations + of the object'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 + type: array + externalRef: + description: A unique specifier for the NetworkConnectivityServiceConnectionPolicy + resource in GCP. + type: string + 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 + observedState: + description: ObservedState is the state of the resource as most recently + observed in GCP. + properties: + createTime: + description: Output only. Time when the ServiceConnectionMap was + created. + type: string + etag: + description: Optional. The etag is computed by the server, and + may be sent on update and delete requests to ensure the client + has an up-to-date value before proceeding. + type: string + infrastructure: + description: Output only. The type of underlying resources used + to create the connection. + type: string + pscConnections: + description: Output only. [Output only] Information about each + Private Service Connect connection. + items: + properties: + consumerAddress: + description: The resource reference of the consumer address. + type: string + consumerForwardingRule: + description: The resource reference of the PSC Forwarding + Rule within the consumer VPC. + type: string + consumerTargetProject: + description: The project where the PSC connection is created. + type: string + error: + description: The most recent error during operating this + connection. + properties: + code: + description: The status code, which should be an enum + value of google.rpc.Code. + format: int32 + type: integer + message: + description: A developer-facing error message, which + should be in English. Any user-facing error message + should be localized and sent in the google.rpc.Status.details + field, or localized by the client. + type: string + type: object + errorInfo: + description: Output only. The error info for the latest + error during operating this connection. + properties: + domain: + description: 'The logical grouping to which the "reason" + belongs. The error domain is typically the registered + service name of the tool or product that generates + the error. Example: "pubsub.googleapis.com". If the + error is generated by some common infrastructure, + the error domain must be a globally unique value that + identifies the infrastructure. For Google API infrastructure, + the error domain is "googleapis.com".' + type: string + metadata: + additionalProperties: + type: string + description: 'Additional structured details about this + error. Keys must match /a-z+/ but should ideally be + lowerCamelCase. Also they must be limited to 64 characters + in length. When identifying the current value of an + exceeded limit, the units should be contained in the + key, not the value. For example, rather than {"instanceLimit": + "100/request"}, should be returned as, {"instanceLimitPerRequest": + "100"}, if the client exceeds the number of instances + that can be created in a single (batch) request.' + type: object + reason: + description: The reason of the error. This is a constant + value that identifies the proximate cause of the error. + Error reasons are unique within a particular domain + of errors. This should be at most 63 characters and + match a regular expression of `A-Z+[A-Z0-9]`, which + represents UPPER_SNAKE_CASE. + type: string + type: object + errorType: + description: The error type indicates whether the error + is consumer facing, producer facing or system internal. + type: string + gceOperation: + description: The last Compute Engine operation to setup + PSC connection. + type: string + producerInstanceID: + description: Immutable. An immutable identifier for the + producer instance. + type: string + pscConnectionID: + description: The PSC connection id of the PSC forwarding + rule. + type: string + selectedSubnetwork: + description: Output only. The URI of the subnetwork selected + to allocate IP address for this connection. + type: string + state: + description: State of the PSC Connection + type: string + type: object + type: array + updateTime: + description: Output only. Time when the ServiceConnectionMap was + updated. + type: string + type: object + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/pkg/clients/generated/apis/networkconnectivity/v1alpha1/doc.go b/pkg/clients/generated/apis/networkconnectivity/v1alpha1/doc.go new file mode 100644 index 0000000000..b2614b9b4a --- /dev/null +++ b/pkg/clients/generated/apis/networkconnectivity/v1alpha1/doc.go @@ -0,0 +1,38 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +// +// ---------------------------------------------------------------------------- +// +// This file is automatically generated by Config Connector and manual +// changes will be clobbered when the file is regenerated. +// +// ---------------------------------------------------------------------------- + +// *** DISCLAIMER *** +// Config Connector's go-client for CRDs is currently in ALPHA, which means +// that future versions of the go-client may include breaking changes. +// Please try it out and give us feedback! + +// Package v1alpha1 contains API Schema definitions for the networkconnectivity v1alpha1 API group. +// +k8s:openapi-gen=true +// +k8s:deepcopy-gen=package,register +// +k8s:conversion-gen=github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/pkg/apis/networkconnectivity +// +k8s:defaulter-gen=TypeMeta +// +groupName=networkconnectivity.cnrm.cloud.google.com + +package v1alpha1 diff --git a/pkg/clients/generated/apis/networkconnectivity/v1alpha1/networkconnectivityserviceconnectionpolicy_types.go b/pkg/clients/generated/apis/networkconnectivity/v1alpha1/networkconnectivityserviceconnectionpolicy_types.go new file mode 100644 index 0000000000..391566ff5e --- /dev/null +++ b/pkg/clients/generated/apis/networkconnectivity/v1alpha1/networkconnectivityserviceconnectionpolicy_types.go @@ -0,0 +1,213 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +// +// ---------------------------------------------------------------------------- +// +// This file is automatically generated by Config Connector and manual +// changes will be clobbered when the file is regenerated. +// +// ---------------------------------------------------------------------------- + +// *** DISCLAIMER *** +// Config Connector's go-client for CRDs is currently in ALPHA, which means +// that future versions of the go-client may include breaking changes. +// Please try it out and give us feedback! + +package v1alpha1 + +import ( + "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/k8s/v1alpha1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +type ServiceconnectionpolicyPscConfig struct { + /* Optional. Max number of PSC connections for this policy. */ + // +optional + Limit *int64 `json:"limit,omitempty"` + + /* Required. ProducerInstanceLocation is used to specify which authorization mechanism to use to determine which projects the Producer instance can be within. */ + // +optional + ProducerInstanceLocation *string `json:"producerInstanceLocation,omitempty"` + + /* The resource paths of subnetworks to use for IP address management. Example: projects/{projectNumOrId}/regions/{region}/subnetworks/{resourceId}. */ + // +optional + SubnetworkRefs []v1alpha1.ResourceRef `json:"subnetworkRefs,omitempty"` +} + +type NetworkConnectivityServiceConnectionPolicySpec struct { + /* A description of this resource. */ + // +optional + Description *string `json:"description,omitempty"` + + /* The resource path of the consumer network. Example: - projects/{projectNumOrId}/global/networks/{resourceId}. */ + // +optional + NetworkRef *v1alpha1.ResourceRef `json:"networkRef,omitempty"` + + /* Configuration used for Private Service Connect connections. Used when Infrastructure is PSC. */ + // +optional + PscConfig *ServiceconnectionpolicyPscConfig `json:"pscConfig,omitempty"` + + /* The NetworkConnectivityServiceConnectionPolicy name. If not given, the metadata.name will be used. */ + // +optional + ResourceID *string `json:"resourceID,omitempty"` + + /* The service class identifier for which this ServiceConnectionPolicy is for. The service class identifier is a unique, symbolic representation of a ServiceClass. It is provided by the Service Producer. Google services have a prefix of gcp. For example, gcp-cloud-sql. 3rd party services do not. For example, test-service-a3dfcx. */ + // +optional + ServiceClass *string `json:"serviceClass,omitempty"` +} + +type ServiceconnectionpolicyErrorInfoStatus struct { + /* The logical grouping to which the "reason" belongs. The error domain is typically the registered service name of the tool or product that generates the error. Example: "pubsub.googleapis.com". If the error is generated by some common infrastructure, the error domain must be a globally unique value that identifies the infrastructure. For Google API infrastructure, the error domain is "googleapis.com". */ + // +optional + Domain *string `json:"domain,omitempty"` + + /* Additional structured details about this error. Keys must match /a-z+/ but should ideally be lowerCamelCase. Also they must be limited to 64 characters in length. When identifying the current value of an exceeded limit, the units should be contained in the key, not the value. For example, rather than {"instanceLimit": "100/request"}, should be returned as, {"instanceLimitPerRequest": "100"}, if the client exceeds the number of instances that can be created in a single (batch) request. */ + // +optional + Metadata map[string]string `json:"metadata,omitempty"` + + /* The reason of the error. This is a constant value that identifies the proximate cause of the error. Error reasons are unique within a particular domain of errors. This should be at most 63 characters and match a regular expression of `A-Z+[A-Z0-9]`, which represents UPPER_SNAKE_CASE. */ + // +optional + Reason *string `json:"reason,omitempty"` +} + +type ServiceconnectionpolicyErrorStatus struct { + /* The status code, which should be an enum value of google.rpc.Code. */ + // +optional + Code *int32 `json:"code,omitempty"` + + /* A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. */ + // +optional + Message *string `json:"message,omitempty"` +} + +type ServiceconnectionpolicyObservedStateStatus struct { + /* Output only. Time when the ServiceConnectionMap was created. */ + // +optional + CreateTime *string `json:"createTime,omitempty"` + + /* Optional. The etag is computed by the server, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. */ + // +optional + Etag *string `json:"etag,omitempty"` + + /* Output only. The type of underlying resources used to create the connection. */ + // +optional + Infrastructure *string `json:"infrastructure,omitempty"` + + /* Output only. [Output only] Information about each Private Service Connect connection. */ + // +optional + PscConnections []ServiceconnectionpolicyPscConnectionsStatus `json:"pscConnections,omitempty"` + + /* Output only. Time when the ServiceConnectionMap was updated. */ + // +optional + UpdateTime *string `json:"updateTime,omitempty"` +} + +type ServiceconnectionpolicyPscConnectionsStatus struct { + /* The resource reference of the consumer address. */ + // +optional + ConsumerAddress *string `json:"consumerAddress,omitempty"` + + /* The resource reference of the PSC Forwarding Rule within the consumer VPC. */ + // +optional + ConsumerForwardingRule *string `json:"consumerForwardingRule,omitempty"` + + /* The project where the PSC connection is created. */ + // +optional + ConsumerTargetProject *string `json:"consumerTargetProject,omitempty"` + + /* The most recent error during operating this connection. */ + // +optional + Error *ServiceconnectionpolicyErrorStatus `json:"error,omitempty"` + + /* Output only. The error info for the latest error during operating this connection. */ + // +optional + ErrorInfo *ServiceconnectionpolicyErrorInfoStatus `json:"errorInfo,omitempty"` + + /* The error type indicates whether the error is consumer facing, producer facing or system internal. */ + // +optional + ErrorType *string `json:"errorType,omitempty"` + + /* The last Compute Engine operation to setup PSC connection. */ + // +optional + GceOperation *string `json:"gceOperation,omitempty"` + + /* Immutable. An immutable identifier for the producer instance. */ + // +optional + ProducerInstanceID *string `json:"producerInstanceID,omitempty"` + + /* The PSC connection id of the PSC forwarding rule. */ + // +optional + PscConnectionID *string `json:"pscConnectionID,omitempty"` + + /* Output only. The URI of the subnetwork selected to allocate IP address for this connection. */ + // +optional + SelectedSubnetwork *string `json:"selectedSubnetwork,omitempty"` + + /* State of the PSC Connection */ + // +optional + State *string `json:"state,omitempty"` +} + +type NetworkConnectivityServiceConnectionPolicyStatus struct { + /* Conditions represent the latest available observations of the + NetworkConnectivityServiceConnectionPolicy's current state. */ + Conditions []v1alpha1.Condition `json:"conditions,omitempty"` + /* A unique specifier for the NetworkConnectivityServiceConnectionPolicy resource in GCP. */ + // +optional + ExternalRef *string `json:"externalRef,omitempty"` + + /* 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. */ + // +optional + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + + /* ObservedState is the state of the resource as most recently observed in GCP. */ + // +optional + ObservedState *ServiceconnectionpolicyObservedStateStatus `json:"observedState,omitempty"` +} + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:resource:categories=,shortName= +// +kubebuilder:subresource:status +// +kubebuilder:metadata:labels="cnrm.cloud.google.com/managed-by-kcc=true";"cnrm.cloud.google.com/system=true" +// +kubebuilder:printcolumn:name="Ready",JSONPath=".status.conditions[?(@.type=='Ready')].status",type="string",description="When 'True', the most recent reconcile of the resource succeeded" +// +kubebuilder:printcolumn:name="Status",JSONPath=".status.conditions[?(@.type=='Ready')].reason",type="string",description="The reason for the value in 'Ready'" +// +kubebuilder:printcolumn:name="Status Age",JSONPath=".status.conditions[?(@.type=='Ready')].lastTransitionTime",type="date",description="The last transition time for the value in 'Status'" + +// NetworkConnectivityServiceConnectionPolicy is the Schema for the networkconnectivity API +// +k8s:openapi-gen=true +type NetworkConnectivityServiceConnectionPolicy struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec NetworkConnectivityServiceConnectionPolicySpec `json:"spec,omitempty"` + Status NetworkConnectivityServiceConnectionPolicyStatus `json:"status,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// NetworkConnectivityServiceConnectionPolicyList contains a list of NetworkConnectivityServiceConnectionPolicy +type NetworkConnectivityServiceConnectionPolicyList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []NetworkConnectivityServiceConnectionPolicy `json:"items"` +} + +func init() { + SchemeBuilder.Register(&NetworkConnectivityServiceConnectionPolicy{}, &NetworkConnectivityServiceConnectionPolicyList{}) +} diff --git a/pkg/clients/generated/apis/networkconnectivity/v1alpha1/register.go b/pkg/clients/generated/apis/networkconnectivity/v1alpha1/register.go new file mode 100644 index 0000000000..b85c52f806 --- /dev/null +++ b/pkg/clients/generated/apis/networkconnectivity/v1alpha1/register.go @@ -0,0 +1,63 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +// +// ---------------------------------------------------------------------------- +// +// This file is automatically generated by Config Connector and manual +// changes will be clobbered when the file is regenerated. +// +// ---------------------------------------------------------------------------- + +// *** DISCLAIMER *** +// Config Connector's go-client for CRDs is currently in ALPHA, which means +// that future versions of the go-client may include breaking changes. +// Please try it out and give us feedback! + +// Package v1alpha1 contains API Schema definitions for the networkconnectivity v1alpha1 API group. +// +k8s:openapi-gen=true +// +k8s:deepcopy-gen=package,register +// +k8s:conversion-gen=github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/pkg/apis/networkconnectivity +// +k8s:defaulter-gen=TypeMeta +// +groupName=networkconnectivity.cnrm.cloud.google.com +package v1alpha1 + +import ( + "reflect" + + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +var ( + // SchemeGroupVersion is the group version used to register these objects. + SchemeGroupVersion = schema.GroupVersion{Group: "networkconnectivity.cnrm.cloud.google.com", Version: "v1alpha1"} + + // SchemeBuilder is used to add go types to the GroupVersionKind scheme. + SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} + + // AddToScheme is a global function that registers this API group & version to a scheme + AddToScheme = SchemeBuilder.AddToScheme + + NetworkConnectivityServiceConnectionPolicyGVK = schema.GroupVersionKind{ + Group: SchemeGroupVersion.Group, + Version: SchemeGroupVersion.Version, + Kind: reflect.TypeOf(NetworkConnectivityServiceConnectionPolicy{}).Name(), + } + + networkconnectivityAPIVersion = SchemeGroupVersion.String() +) diff --git a/pkg/clients/generated/apis/networkconnectivity/v1alpha1/zz_generated.deepcopy.go b/pkg/clients/generated/apis/networkconnectivity/v1alpha1/zz_generated.deepcopy.go new file mode 100644 index 0000000000..2286d38c11 --- /dev/null +++ b/pkg/clients/generated/apis/networkconnectivity/v1alpha1/zz_generated.deepcopy.go @@ -0,0 +1,372 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// *** DISCLAIMER *** +// Config Connector's go-client for CRDs is currently in ALPHA, which means +// that future versions of the go-client may include breaking changes. +// Please try it out and give us feedback! + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + k8sv1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/k8s/v1alpha1" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NetworkConnectivityServiceConnectionPolicy) DeepCopyInto(out *NetworkConnectivityServiceConnectionPolicy) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkConnectivityServiceConnectionPolicy. +func (in *NetworkConnectivityServiceConnectionPolicy) DeepCopy() *NetworkConnectivityServiceConnectionPolicy { + if in == nil { + return nil + } + out := new(NetworkConnectivityServiceConnectionPolicy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *NetworkConnectivityServiceConnectionPolicy) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NetworkConnectivityServiceConnectionPolicyList) DeepCopyInto(out *NetworkConnectivityServiceConnectionPolicyList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]NetworkConnectivityServiceConnectionPolicy, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkConnectivityServiceConnectionPolicyList. +func (in *NetworkConnectivityServiceConnectionPolicyList) DeepCopy() *NetworkConnectivityServiceConnectionPolicyList { + if in == nil { + return nil + } + out := new(NetworkConnectivityServiceConnectionPolicyList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *NetworkConnectivityServiceConnectionPolicyList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NetworkConnectivityServiceConnectionPolicySpec) DeepCopyInto(out *NetworkConnectivityServiceConnectionPolicySpec) { + *out = *in + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.NetworkRef != nil { + in, out := &in.NetworkRef, &out.NetworkRef + *out = new(k8sv1alpha1.ResourceRef) + **out = **in + } + if in.PscConfig != nil { + in, out := &in.PscConfig, &out.PscConfig + *out = new(ServiceconnectionpolicyPscConfig) + (*in).DeepCopyInto(*out) + } + if in.ResourceID != nil { + in, out := &in.ResourceID, &out.ResourceID + *out = new(string) + **out = **in + } + if in.ServiceClass != nil { + in, out := &in.ServiceClass, &out.ServiceClass + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkConnectivityServiceConnectionPolicySpec. +func (in *NetworkConnectivityServiceConnectionPolicySpec) DeepCopy() *NetworkConnectivityServiceConnectionPolicySpec { + if in == nil { + return nil + } + out := new(NetworkConnectivityServiceConnectionPolicySpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NetworkConnectivityServiceConnectionPolicyStatus) DeepCopyInto(out *NetworkConnectivityServiceConnectionPolicyStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]k8sv1alpha1.Condition, len(*in)) + copy(*out, *in) + } + if in.ExternalRef != nil { + in, out := &in.ExternalRef, &out.ExternalRef + *out = new(string) + **out = **in + } + if in.ObservedGeneration != nil { + in, out := &in.ObservedGeneration, &out.ObservedGeneration + *out = new(int64) + **out = **in + } + if in.ObservedState != nil { + in, out := &in.ObservedState, &out.ObservedState + *out = new(ServiceconnectionpolicyObservedStateStatus) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkConnectivityServiceConnectionPolicyStatus. +func (in *NetworkConnectivityServiceConnectionPolicyStatus) DeepCopy() *NetworkConnectivityServiceConnectionPolicyStatus { + if in == nil { + return nil + } + out := new(NetworkConnectivityServiceConnectionPolicyStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServiceconnectionpolicyErrorInfoStatus) DeepCopyInto(out *ServiceconnectionpolicyErrorInfoStatus) { + *out = *in + if in.Domain != nil { + in, out := &in.Domain, &out.Domain + *out = new(string) + **out = **in + } + if in.Metadata != nil { + in, out := &in.Metadata, &out.Metadata + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Reason != nil { + in, out := &in.Reason, &out.Reason + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceconnectionpolicyErrorInfoStatus. +func (in *ServiceconnectionpolicyErrorInfoStatus) DeepCopy() *ServiceconnectionpolicyErrorInfoStatus { + if in == nil { + return nil + } + out := new(ServiceconnectionpolicyErrorInfoStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServiceconnectionpolicyErrorStatus) DeepCopyInto(out *ServiceconnectionpolicyErrorStatus) { + *out = *in + if in.Code != nil { + in, out := &in.Code, &out.Code + *out = new(int32) + **out = **in + } + if in.Message != nil { + in, out := &in.Message, &out.Message + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceconnectionpolicyErrorStatus. +func (in *ServiceconnectionpolicyErrorStatus) DeepCopy() *ServiceconnectionpolicyErrorStatus { + if in == nil { + return nil + } + out := new(ServiceconnectionpolicyErrorStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServiceconnectionpolicyObservedStateStatus) DeepCopyInto(out *ServiceconnectionpolicyObservedStateStatus) { + *out = *in + if in.CreateTime != nil { + in, out := &in.CreateTime, &out.CreateTime + *out = new(string) + **out = **in + } + if in.Etag != nil { + in, out := &in.Etag, &out.Etag + *out = new(string) + **out = **in + } + if in.Infrastructure != nil { + in, out := &in.Infrastructure, &out.Infrastructure + *out = new(string) + **out = **in + } + if in.PscConnections != nil { + in, out := &in.PscConnections, &out.PscConnections + *out = make([]ServiceconnectionpolicyPscConnectionsStatus, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.UpdateTime != nil { + in, out := &in.UpdateTime, &out.UpdateTime + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceconnectionpolicyObservedStateStatus. +func (in *ServiceconnectionpolicyObservedStateStatus) DeepCopy() *ServiceconnectionpolicyObservedStateStatus { + if in == nil { + return nil + } + out := new(ServiceconnectionpolicyObservedStateStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServiceconnectionpolicyPscConfig) DeepCopyInto(out *ServiceconnectionpolicyPscConfig) { + *out = *in + if in.Limit != nil { + in, out := &in.Limit, &out.Limit + *out = new(int64) + **out = **in + } + if in.ProducerInstanceLocation != nil { + in, out := &in.ProducerInstanceLocation, &out.ProducerInstanceLocation + *out = new(string) + **out = **in + } + if in.SubnetworkRefs != nil { + in, out := &in.SubnetworkRefs, &out.SubnetworkRefs + *out = make([]k8sv1alpha1.ResourceRef, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceconnectionpolicyPscConfig. +func (in *ServiceconnectionpolicyPscConfig) DeepCopy() *ServiceconnectionpolicyPscConfig { + if in == nil { + return nil + } + out := new(ServiceconnectionpolicyPscConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServiceconnectionpolicyPscConnectionsStatus) DeepCopyInto(out *ServiceconnectionpolicyPscConnectionsStatus) { + *out = *in + if in.ConsumerAddress != nil { + in, out := &in.ConsumerAddress, &out.ConsumerAddress + *out = new(string) + **out = **in + } + if in.ConsumerForwardingRule != nil { + in, out := &in.ConsumerForwardingRule, &out.ConsumerForwardingRule + *out = new(string) + **out = **in + } + if in.ConsumerTargetProject != nil { + in, out := &in.ConsumerTargetProject, &out.ConsumerTargetProject + *out = new(string) + **out = **in + } + if in.Error != nil { + in, out := &in.Error, &out.Error + *out = new(ServiceconnectionpolicyErrorStatus) + (*in).DeepCopyInto(*out) + } + if in.ErrorInfo != nil { + in, out := &in.ErrorInfo, &out.ErrorInfo + *out = new(ServiceconnectionpolicyErrorInfoStatus) + (*in).DeepCopyInto(*out) + } + if in.ErrorType != nil { + in, out := &in.ErrorType, &out.ErrorType + *out = new(string) + **out = **in + } + if in.GceOperation != nil { + in, out := &in.GceOperation, &out.GceOperation + *out = new(string) + **out = **in + } + if in.ProducerInstanceID != nil { + in, out := &in.ProducerInstanceID, &out.ProducerInstanceID + *out = new(string) + **out = **in + } + if in.PscConnectionID != nil { + in, out := &in.PscConnectionID, &out.PscConnectionID + *out = new(string) + **out = **in + } + if in.SelectedSubnetwork != nil { + in, out := &in.SelectedSubnetwork, &out.SelectedSubnetwork + *out = new(string) + **out = **in + } + if in.State != nil { + in, out := &in.State, &out.State + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceconnectionpolicyPscConnectionsStatus. +func (in *ServiceconnectionpolicyPscConnectionsStatus) DeepCopy() *ServiceconnectionpolicyPscConnectionsStatus { + if in == nil { + return nil + } + out := new(ServiceconnectionpolicyPscConnectionsStatus) + in.DeepCopyInto(out) + return out +} diff --git a/pkg/clients/generated/client/clientset/versioned/clientset.go b/pkg/clients/generated/client/clientset/versioned/clientset.go index 9616071e5d..75ba0d03ba 100644 --- a/pkg/clients/generated/client/clientset/versioned/clientset.go +++ b/pkg/clients/generated/client/clientset/versioned/clientset.go @@ -102,6 +102,7 @@ import ( memcachev1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/typed/memcache/v1beta1" mlenginev1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/typed/mlengine/v1alpha1" monitoringv1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/typed/monitoring/v1beta1" + networkconnectivityv1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/typed/networkconnectivity/v1alpha1" networkconnectivityv1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/typed/networkconnectivity/v1beta1" networkmanagementv1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/typed/networkmanagement/v1alpha1" networksecurityv1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/typed/networksecurity/v1beta1" @@ -227,6 +228,7 @@ type Interface interface { MemcacheV1beta1() memcachev1beta1.MemcacheV1beta1Interface MlengineV1alpha1() mlenginev1alpha1.MlengineV1alpha1Interface MonitoringV1beta1() monitoringv1beta1.MonitoringV1beta1Interface + NetworkconnectivityV1alpha1() networkconnectivityv1alpha1.NetworkconnectivityV1alpha1Interface NetworkconnectivityV1beta1() networkconnectivityv1beta1.NetworkconnectivityV1beta1Interface NetworkmanagementV1alpha1() networkmanagementv1alpha1.NetworkmanagementV1alpha1Interface NetworksecurityV1beta1() networksecurityv1beta1.NetworksecurityV1beta1Interface @@ -350,6 +352,7 @@ type Clientset struct { memcacheV1beta1 *memcachev1beta1.MemcacheV1beta1Client mlengineV1alpha1 *mlenginev1alpha1.MlengineV1alpha1Client monitoringV1beta1 *monitoringv1beta1.MonitoringV1beta1Client + networkconnectivityV1alpha1 *networkconnectivityv1alpha1.NetworkconnectivityV1alpha1Client networkconnectivityV1beta1 *networkconnectivityv1beta1.NetworkconnectivityV1beta1Client networkmanagementV1alpha1 *networkmanagementv1alpha1.NetworkmanagementV1alpha1Client networksecurityV1beta1 *networksecurityv1beta1.NetworksecurityV1beta1Client @@ -778,6 +781,11 @@ func (c *Clientset) MonitoringV1beta1() monitoringv1beta1.MonitoringV1beta1Inter return c.monitoringV1beta1 } +// NetworkconnectivityV1alpha1 retrieves the NetworkconnectivityV1alpha1Client +func (c *Clientset) NetworkconnectivityV1alpha1() networkconnectivityv1alpha1.NetworkconnectivityV1alpha1Interface { + return c.networkconnectivityV1alpha1 +} + // NetworkconnectivityV1beta1 retrieves the NetworkconnectivityV1beta1Client func (c *Clientset) NetworkconnectivityV1beta1() networkconnectivityv1beta1.NetworkconnectivityV1beta1Interface { return c.networkconnectivityV1beta1 @@ -1335,6 +1343,10 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, if err != nil { return nil, err } + cs.networkconnectivityV1alpha1, err = networkconnectivityv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) + if err != nil { + return nil, err + } cs.networkconnectivityV1beta1, err = networkconnectivityv1beta1.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { return nil, err @@ -1597,6 +1609,7 @@ func New(c rest.Interface) *Clientset { cs.memcacheV1beta1 = memcachev1beta1.New(c) cs.mlengineV1alpha1 = mlenginev1alpha1.New(c) cs.monitoringV1beta1 = monitoringv1beta1.New(c) + cs.networkconnectivityV1alpha1 = networkconnectivityv1alpha1.New(c) cs.networkconnectivityV1beta1 = networkconnectivityv1beta1.New(c) cs.networkmanagementV1alpha1 = networkmanagementv1alpha1.New(c) cs.networksecurityV1beta1 = networksecurityv1beta1.New(c) diff --git a/pkg/clients/generated/client/clientset/versioned/fake/clientset_generated.go b/pkg/clients/generated/client/clientset/versioned/fake/clientset_generated.go index e4aeb0b43f..3e9365db18 100644 --- a/pkg/clients/generated/client/clientset/versioned/fake/clientset_generated.go +++ b/pkg/clients/generated/client/clientset/versioned/fake/clientset_generated.go @@ -177,6 +177,8 @@ import ( fakemlenginev1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/typed/mlengine/v1alpha1/fake" monitoringv1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/typed/monitoring/v1beta1" fakemonitoringv1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/typed/monitoring/v1beta1/fake" + networkconnectivityv1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/typed/networkconnectivity/v1alpha1" + fakenetworkconnectivityv1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/typed/networkconnectivity/v1alpha1/fake" networkconnectivityv1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/typed/networkconnectivity/v1beta1" fakenetworkconnectivityv1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/typed/networkconnectivity/v1beta1/fake" networkmanagementv1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/typed/networkmanagement/v1alpha1" @@ -701,6 +703,11 @@ func (c *Clientset) MonitoringV1beta1() monitoringv1beta1.MonitoringV1beta1Inter return &fakemonitoringv1beta1.FakeMonitoringV1beta1{Fake: &c.Fake} } +// NetworkconnectivityV1alpha1 retrieves the NetworkconnectivityV1alpha1Client +func (c *Clientset) NetworkconnectivityV1alpha1() networkconnectivityv1alpha1.NetworkconnectivityV1alpha1Interface { + return &fakenetworkconnectivityv1alpha1.FakeNetworkconnectivityV1alpha1{Fake: &c.Fake} +} + // NetworkconnectivityV1beta1 retrieves the NetworkconnectivityV1beta1Client func (c *Clientset) NetworkconnectivityV1beta1() networkconnectivityv1beta1.NetworkconnectivityV1beta1Interface { return &fakenetworkconnectivityv1beta1.FakeNetworkconnectivityV1beta1{Fake: &c.Fake} diff --git a/pkg/clients/generated/client/clientset/versioned/fake/register.go b/pkg/clients/generated/client/clientset/versioned/fake/register.go index 627ae0171b..8d19c1b96c 100644 --- a/pkg/clients/generated/client/clientset/versioned/fake/register.go +++ b/pkg/clients/generated/client/clientset/versioned/fake/register.go @@ -99,6 +99,7 @@ import ( memcachev1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/memcache/v1beta1" mlenginev1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/mlengine/v1alpha1" monitoringv1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/monitoring/v1beta1" + networkconnectivityv1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/networkconnectivity/v1alpha1" networkconnectivityv1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/networkconnectivity/v1beta1" networkmanagementv1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/networkmanagement/v1alpha1" networksecurityv1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/networksecurity/v1beta1" @@ -228,6 +229,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{ memcachev1beta1.AddToScheme, mlenginev1alpha1.AddToScheme, monitoringv1beta1.AddToScheme, + networkconnectivityv1alpha1.AddToScheme, networkconnectivityv1beta1.AddToScheme, networkmanagementv1alpha1.AddToScheme, networksecurityv1beta1.AddToScheme, diff --git a/pkg/clients/generated/client/clientset/versioned/scheme/register.go b/pkg/clients/generated/client/clientset/versioned/scheme/register.go index 3ebd795e3f..81f254fc96 100644 --- a/pkg/clients/generated/client/clientset/versioned/scheme/register.go +++ b/pkg/clients/generated/client/clientset/versioned/scheme/register.go @@ -99,6 +99,7 @@ import ( memcachev1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/memcache/v1beta1" mlenginev1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/mlengine/v1alpha1" monitoringv1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/monitoring/v1beta1" + networkconnectivityv1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/networkconnectivity/v1alpha1" networkconnectivityv1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/networkconnectivity/v1beta1" networkmanagementv1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/networkmanagement/v1alpha1" networksecurityv1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/networksecurity/v1beta1" @@ -228,6 +229,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{ memcachev1beta1.AddToScheme, mlenginev1alpha1.AddToScheme, monitoringv1beta1.AddToScheme, + networkconnectivityv1alpha1.AddToScheme, networkconnectivityv1beta1.AddToScheme, networkmanagementv1alpha1.AddToScheme, networksecurityv1beta1.AddToScheme, diff --git a/pkg/clients/generated/client/clientset/versioned/typed/networkconnectivity/v1alpha1/doc.go b/pkg/clients/generated/client/clientset/versioned/typed/networkconnectivity/v1alpha1/doc.go new file mode 100644 index 0000000000..d3dac805d0 --- /dev/null +++ b/pkg/clients/generated/client/clientset/versioned/typed/networkconnectivity/v1alpha1/doc.go @@ -0,0 +1,23 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// *** DISCLAIMER *** +// Config Connector's go-client for CRDs is currently in ALPHA, which means +// that future versions of the go-client may include breaking changes. +// Please try it out and give us feedback! + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated typed clients. +package v1alpha1 diff --git a/pkg/clients/generated/client/clientset/versioned/typed/networkconnectivity/v1alpha1/fake/doc.go b/pkg/clients/generated/client/clientset/versioned/typed/networkconnectivity/v1alpha1/fake/doc.go new file mode 100644 index 0000000000..dfbe79f9af --- /dev/null +++ b/pkg/clients/generated/client/clientset/versioned/typed/networkconnectivity/v1alpha1/fake/doc.go @@ -0,0 +1,23 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// *** DISCLAIMER *** +// Config Connector's go-client for CRDs is currently in ALPHA, which means +// that future versions of the go-client may include breaking changes. +// Please try it out and give us feedback! + +// Code generated by client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/pkg/clients/generated/client/clientset/versioned/typed/networkconnectivity/v1alpha1/fake/fake_networkconnectivity_client.go b/pkg/clients/generated/client/clientset/versioned/typed/networkconnectivity/v1alpha1/fake/fake_networkconnectivity_client.go new file mode 100644 index 0000000000..d13373b7c0 --- /dev/null +++ b/pkg/clients/generated/client/clientset/versioned/typed/networkconnectivity/v1alpha1/fake/fake_networkconnectivity_client.go @@ -0,0 +1,43 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// *** DISCLAIMER *** +// Config Connector's go-client for CRDs is currently in ALPHA, which means +// that future versions of the go-client may include breaking changes. +// Please try it out and give us feedback! + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + v1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/typed/networkconnectivity/v1alpha1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeNetworkconnectivityV1alpha1 struct { + *testing.Fake +} + +func (c *FakeNetworkconnectivityV1alpha1) NetworkConnectivityServiceConnectionPolicies(namespace string) v1alpha1.NetworkConnectivityServiceConnectionPolicyInterface { + return &FakeNetworkConnectivityServiceConnectionPolicies{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeNetworkconnectivityV1alpha1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/pkg/clients/generated/client/clientset/versioned/typed/networkconnectivity/v1alpha1/fake/fake_networkconnectivityserviceconnectionpolicy.go b/pkg/clients/generated/client/clientset/versioned/typed/networkconnectivity/v1alpha1/fake/fake_networkconnectivityserviceconnectionpolicy.go new file mode 100644 index 0000000000..d30f6485b7 --- /dev/null +++ b/pkg/clients/generated/client/clientset/versioned/typed/networkconnectivity/v1alpha1/fake/fake_networkconnectivityserviceconnectionpolicy.go @@ -0,0 +1,144 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// *** DISCLAIMER *** +// Config Connector's go-client for CRDs is currently in ALPHA, which means +// that future versions of the go-client may include breaking changes. +// Please try it out and give us feedback! + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/networkconnectivity/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" +) + +// FakeNetworkConnectivityServiceConnectionPolicies implements NetworkConnectivityServiceConnectionPolicyInterface +type FakeNetworkConnectivityServiceConnectionPolicies struct { + Fake *FakeNetworkconnectivityV1alpha1 + ns string +} + +var networkconnectivityserviceconnectionpoliciesResource = v1alpha1.SchemeGroupVersion.WithResource("networkconnectivityserviceconnectionpolicies") + +var networkconnectivityserviceconnectionpoliciesKind = v1alpha1.SchemeGroupVersion.WithKind("NetworkConnectivityServiceConnectionPolicy") + +// Get takes name of the networkConnectivityServiceConnectionPolicy, and returns the corresponding networkConnectivityServiceConnectionPolicy object, and an error if there is any. +func (c *FakeNetworkConnectivityServiceConnectionPolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.NetworkConnectivityServiceConnectionPolicy, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(networkconnectivityserviceconnectionpoliciesResource, c.ns, name), &v1alpha1.NetworkConnectivityServiceConnectionPolicy{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.NetworkConnectivityServiceConnectionPolicy), err +} + +// List takes label and field selectors, and returns the list of NetworkConnectivityServiceConnectionPolicies that match those selectors. +func (c *FakeNetworkConnectivityServiceConnectionPolicies) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.NetworkConnectivityServiceConnectionPolicyList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(networkconnectivityserviceconnectionpoliciesResource, networkconnectivityserviceconnectionpoliciesKind, c.ns, opts), &v1alpha1.NetworkConnectivityServiceConnectionPolicyList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.NetworkConnectivityServiceConnectionPolicyList{ListMeta: obj.(*v1alpha1.NetworkConnectivityServiceConnectionPolicyList).ListMeta} + for _, item := range obj.(*v1alpha1.NetworkConnectivityServiceConnectionPolicyList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested networkConnectivityServiceConnectionPolicies. +func (c *FakeNetworkConnectivityServiceConnectionPolicies) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(networkconnectivityserviceconnectionpoliciesResource, c.ns, opts)) + +} + +// Create takes the representation of a networkConnectivityServiceConnectionPolicy and creates it. Returns the server's representation of the networkConnectivityServiceConnectionPolicy, and an error, if there is any. +func (c *FakeNetworkConnectivityServiceConnectionPolicies) Create(ctx context.Context, networkConnectivityServiceConnectionPolicy *v1alpha1.NetworkConnectivityServiceConnectionPolicy, opts v1.CreateOptions) (result *v1alpha1.NetworkConnectivityServiceConnectionPolicy, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(networkconnectivityserviceconnectionpoliciesResource, c.ns, networkConnectivityServiceConnectionPolicy), &v1alpha1.NetworkConnectivityServiceConnectionPolicy{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.NetworkConnectivityServiceConnectionPolicy), err +} + +// Update takes the representation of a networkConnectivityServiceConnectionPolicy and updates it. Returns the server's representation of the networkConnectivityServiceConnectionPolicy, and an error, if there is any. +func (c *FakeNetworkConnectivityServiceConnectionPolicies) Update(ctx context.Context, networkConnectivityServiceConnectionPolicy *v1alpha1.NetworkConnectivityServiceConnectionPolicy, opts v1.UpdateOptions) (result *v1alpha1.NetworkConnectivityServiceConnectionPolicy, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(networkconnectivityserviceconnectionpoliciesResource, c.ns, networkConnectivityServiceConnectionPolicy), &v1alpha1.NetworkConnectivityServiceConnectionPolicy{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.NetworkConnectivityServiceConnectionPolicy), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeNetworkConnectivityServiceConnectionPolicies) UpdateStatus(ctx context.Context, networkConnectivityServiceConnectionPolicy *v1alpha1.NetworkConnectivityServiceConnectionPolicy, opts v1.UpdateOptions) (*v1alpha1.NetworkConnectivityServiceConnectionPolicy, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(networkconnectivityserviceconnectionpoliciesResource, "status", c.ns, networkConnectivityServiceConnectionPolicy), &v1alpha1.NetworkConnectivityServiceConnectionPolicy{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.NetworkConnectivityServiceConnectionPolicy), err +} + +// Delete takes name of the networkConnectivityServiceConnectionPolicy and deletes it. Returns an error if one occurs. +func (c *FakeNetworkConnectivityServiceConnectionPolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(networkconnectivityserviceconnectionpoliciesResource, c.ns, name, opts), &v1alpha1.NetworkConnectivityServiceConnectionPolicy{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeNetworkConnectivityServiceConnectionPolicies) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(networkconnectivityserviceconnectionpoliciesResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.NetworkConnectivityServiceConnectionPolicyList{}) + return err +} + +// Patch applies the patch and returns the patched networkConnectivityServiceConnectionPolicy. +func (c *FakeNetworkConnectivityServiceConnectionPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.NetworkConnectivityServiceConnectionPolicy, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(networkconnectivityserviceconnectionpoliciesResource, c.ns, name, pt, data, subresources...), &v1alpha1.NetworkConnectivityServiceConnectionPolicy{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.NetworkConnectivityServiceConnectionPolicy), err +} diff --git a/pkg/clients/generated/client/clientset/versioned/typed/networkconnectivity/v1alpha1/generated_expansion.go b/pkg/clients/generated/client/clientset/versioned/typed/networkconnectivity/v1alpha1/generated_expansion.go new file mode 100644 index 0000000000..63b667c1e1 --- /dev/null +++ b/pkg/clients/generated/client/clientset/versioned/typed/networkconnectivity/v1alpha1/generated_expansion.go @@ -0,0 +1,24 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// *** DISCLAIMER *** +// Config Connector's go-client for CRDs is currently in ALPHA, which means +// that future versions of the go-client may include breaking changes. +// Please try it out and give us feedback! + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +type NetworkConnectivityServiceConnectionPolicyExpansion interface{} diff --git a/pkg/clients/generated/client/clientset/versioned/typed/networkconnectivity/v1alpha1/networkconnectivity_client.go b/pkg/clients/generated/client/clientset/versioned/typed/networkconnectivity/v1alpha1/networkconnectivity_client.go new file mode 100644 index 0000000000..cb6c871695 --- /dev/null +++ b/pkg/clients/generated/client/clientset/versioned/typed/networkconnectivity/v1alpha1/networkconnectivity_client.go @@ -0,0 +1,110 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// *** DISCLAIMER *** +// Config Connector's go-client for CRDs is currently in ALPHA, which means +// that future versions of the go-client may include breaking changes. +// Please try it out and give us feedback! + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "net/http" + + v1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/networkconnectivity/v1alpha1" + "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/scheme" + rest "k8s.io/client-go/rest" +) + +type NetworkconnectivityV1alpha1Interface interface { + RESTClient() rest.Interface + NetworkConnectivityServiceConnectionPoliciesGetter +} + +// NetworkconnectivityV1alpha1Client is used to interact with features provided by the networkconnectivity.cnrm.cloud.google.com group. +type NetworkconnectivityV1alpha1Client struct { + restClient rest.Interface +} + +func (c *NetworkconnectivityV1alpha1Client) NetworkConnectivityServiceConnectionPolicies(namespace string) NetworkConnectivityServiceConnectionPolicyInterface { + return newNetworkConnectivityServiceConnectionPolicies(c, namespace) +} + +// NewForConfig creates a new NetworkconnectivityV1alpha1Client for the given config. +// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), +// where httpClient was generated with rest.HTTPClientFor(c). +func NewForConfig(c *rest.Config) (*NetworkconnectivityV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + httpClient, err := rest.HTTPClientFor(&config) + if err != nil { + return nil, err + } + return NewForConfigAndClient(&config, httpClient) +} + +// NewForConfigAndClient creates a new NetworkconnectivityV1alpha1Client for the given config and http client. +// Note the http client provided takes precedence over the configured transport values. +func NewForConfigAndClient(c *rest.Config, h *http.Client) (*NetworkconnectivityV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientForConfigAndClient(&config, h) + if err != nil { + return nil, err + } + return &NetworkconnectivityV1alpha1Client{client}, nil +} + +// NewForConfigOrDie creates a new NetworkconnectivityV1alpha1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *NetworkconnectivityV1alpha1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new NetworkconnectivityV1alpha1Client for the given RESTClient. +func New(c rest.Interface) *NetworkconnectivityV1alpha1Client { + return &NetworkconnectivityV1alpha1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1alpha1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *NetworkconnectivityV1alpha1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/pkg/clients/generated/client/clientset/versioned/typed/networkconnectivity/v1alpha1/networkconnectivityserviceconnectionpolicy.go b/pkg/clients/generated/client/clientset/versioned/typed/networkconnectivity/v1alpha1/networkconnectivityserviceconnectionpolicy.go new file mode 100644 index 0000000000..d85cc3560f --- /dev/null +++ b/pkg/clients/generated/client/clientset/versioned/typed/networkconnectivity/v1alpha1/networkconnectivityserviceconnectionpolicy.go @@ -0,0 +1,198 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// *** DISCLAIMER *** +// Config Connector's go-client for CRDs is currently in ALPHA, which means +// that future versions of the go-client may include breaking changes. +// Please try it out and give us feedback! + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + "time" + + v1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/networkconnectivity/v1alpha1" + scheme "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// NetworkConnectivityServiceConnectionPoliciesGetter has a method to return a NetworkConnectivityServiceConnectionPolicyInterface. +// A group's client should implement this interface. +type NetworkConnectivityServiceConnectionPoliciesGetter interface { + NetworkConnectivityServiceConnectionPolicies(namespace string) NetworkConnectivityServiceConnectionPolicyInterface +} + +// NetworkConnectivityServiceConnectionPolicyInterface has methods to work with NetworkConnectivityServiceConnectionPolicy resources. +type NetworkConnectivityServiceConnectionPolicyInterface interface { + Create(ctx context.Context, networkConnectivityServiceConnectionPolicy *v1alpha1.NetworkConnectivityServiceConnectionPolicy, opts v1.CreateOptions) (*v1alpha1.NetworkConnectivityServiceConnectionPolicy, error) + Update(ctx context.Context, networkConnectivityServiceConnectionPolicy *v1alpha1.NetworkConnectivityServiceConnectionPolicy, opts v1.UpdateOptions) (*v1alpha1.NetworkConnectivityServiceConnectionPolicy, error) + UpdateStatus(ctx context.Context, networkConnectivityServiceConnectionPolicy *v1alpha1.NetworkConnectivityServiceConnectionPolicy, opts v1.UpdateOptions) (*v1alpha1.NetworkConnectivityServiceConnectionPolicy, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.NetworkConnectivityServiceConnectionPolicy, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.NetworkConnectivityServiceConnectionPolicyList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.NetworkConnectivityServiceConnectionPolicy, err error) + NetworkConnectivityServiceConnectionPolicyExpansion +} + +// networkConnectivityServiceConnectionPolicies implements NetworkConnectivityServiceConnectionPolicyInterface +type networkConnectivityServiceConnectionPolicies struct { + client rest.Interface + ns string +} + +// newNetworkConnectivityServiceConnectionPolicies returns a NetworkConnectivityServiceConnectionPolicies +func newNetworkConnectivityServiceConnectionPolicies(c *NetworkconnectivityV1alpha1Client, namespace string) *networkConnectivityServiceConnectionPolicies { + return &networkConnectivityServiceConnectionPolicies{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the networkConnectivityServiceConnectionPolicy, and returns the corresponding networkConnectivityServiceConnectionPolicy object, and an error if there is any. +func (c *networkConnectivityServiceConnectionPolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.NetworkConnectivityServiceConnectionPolicy, err error) { + result = &v1alpha1.NetworkConnectivityServiceConnectionPolicy{} + err = c.client.Get(). + Namespace(c.ns). + Resource("networkconnectivityserviceconnectionpolicies"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of NetworkConnectivityServiceConnectionPolicies that match those selectors. +func (c *networkConnectivityServiceConnectionPolicies) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.NetworkConnectivityServiceConnectionPolicyList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.NetworkConnectivityServiceConnectionPolicyList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("networkconnectivityserviceconnectionpolicies"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested networkConnectivityServiceConnectionPolicies. +func (c *networkConnectivityServiceConnectionPolicies) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("networkconnectivityserviceconnectionpolicies"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a networkConnectivityServiceConnectionPolicy and creates it. Returns the server's representation of the networkConnectivityServiceConnectionPolicy, and an error, if there is any. +func (c *networkConnectivityServiceConnectionPolicies) Create(ctx context.Context, networkConnectivityServiceConnectionPolicy *v1alpha1.NetworkConnectivityServiceConnectionPolicy, opts v1.CreateOptions) (result *v1alpha1.NetworkConnectivityServiceConnectionPolicy, err error) { + result = &v1alpha1.NetworkConnectivityServiceConnectionPolicy{} + err = c.client.Post(). + Namespace(c.ns). + Resource("networkconnectivityserviceconnectionpolicies"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(networkConnectivityServiceConnectionPolicy). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a networkConnectivityServiceConnectionPolicy and updates it. Returns the server's representation of the networkConnectivityServiceConnectionPolicy, and an error, if there is any. +func (c *networkConnectivityServiceConnectionPolicies) Update(ctx context.Context, networkConnectivityServiceConnectionPolicy *v1alpha1.NetworkConnectivityServiceConnectionPolicy, opts v1.UpdateOptions) (result *v1alpha1.NetworkConnectivityServiceConnectionPolicy, err error) { + result = &v1alpha1.NetworkConnectivityServiceConnectionPolicy{} + err = c.client.Put(). + Namespace(c.ns). + Resource("networkconnectivityserviceconnectionpolicies"). + Name(networkConnectivityServiceConnectionPolicy.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(networkConnectivityServiceConnectionPolicy). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *networkConnectivityServiceConnectionPolicies) UpdateStatus(ctx context.Context, networkConnectivityServiceConnectionPolicy *v1alpha1.NetworkConnectivityServiceConnectionPolicy, opts v1.UpdateOptions) (result *v1alpha1.NetworkConnectivityServiceConnectionPolicy, err error) { + result = &v1alpha1.NetworkConnectivityServiceConnectionPolicy{} + err = c.client.Put(). + Namespace(c.ns). + Resource("networkconnectivityserviceconnectionpolicies"). + Name(networkConnectivityServiceConnectionPolicy.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(networkConnectivityServiceConnectionPolicy). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the networkConnectivityServiceConnectionPolicy and deletes it. Returns an error if one occurs. +func (c *networkConnectivityServiceConnectionPolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("networkconnectivityserviceconnectionpolicies"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *networkConnectivityServiceConnectionPolicies) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("networkconnectivityserviceconnectionpolicies"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched networkConnectivityServiceConnectionPolicy. +func (c *networkConnectivityServiceConnectionPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.NetworkConnectivityServiceConnectionPolicy, err error) { + result = &v1alpha1.NetworkConnectivityServiceConnectionPolicy{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("networkconnectivityserviceconnectionpolicies"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +}