/
bigqueryconnectionconnection_types.go
232 lines (185 loc) · 8.75 KB
/
bigqueryconnectionconnection_types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
// 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 ConnectionAccessRole struct {
/* The user’s AWS IAM Role that trusts the Google-owned AWS IAM user Connection. */
IamRoleId string `json:"iamRoleId"`
/* A unique Google-owned and Google-generated identity for the Connection. This identity will be used to access the user's AWS IAM Role. */
// +optional
Identity *string `json:"identity,omitempty"`
}
type ConnectionAws struct {
/* Authentication using Google owned service account to assume into customer's AWS IAM Role. */
AccessRole ConnectionAccessRole `json:"accessRole"`
}
type ConnectionAzure struct {
/* The name of the Azure Active Directory Application. */
// +optional
Application *string `json:"application,omitempty"`
/* The client id of the Azure Active Directory Application. */
// +optional
ClientId *string `json:"clientId,omitempty"`
/* The id of customer's directory that host the data. */
CustomerTenantId string `json:"customerTenantId"`
/* The Azure Application (client) ID where the federated credentials will be hosted. */
// +optional
FederatedApplicationClientId *string `json:"federatedApplicationClientId,omitempty"`
/* A unique Google-owned and Google-generated identity for the Connection. This identity will be used to access the user's Azure Active Directory Application. */
// +optional
Identity *string `json:"identity,omitempty"`
/* The object id of the Azure Active Directory Application. */
// +optional
ObjectId *string `json:"objectId,omitempty"`
/* The URL user will be redirected to after granting consent during connection setup. */
// +optional
RedirectUri *string `json:"redirectUri,omitempty"`
}
type ConnectionCloudResource struct {
/* The account ID of the service created for the purpose of this connection. */
// +optional
ServiceAccountId *string `json:"serviceAccountId,omitempty"`
}
type ConnectionCloudSpanner struct {
/* Cloud Spanner database in the form 'project/instance/database'. */
Database string `json:"database"`
/* If parallelism should be used when reading from Cloud Spanner. */
// +optional
UseParallelism *bool `json:"useParallelism,omitempty"`
/* If the serverless analytics service should be used to read data from Cloud Spanner. useParallelism must be set when using serverless analytics. */
// +optional
UseServerlessAnalytics *bool `json:"useServerlessAnalytics,omitempty"`
}
type ConnectionCloudSql struct {
/* Cloud SQL properties. */
Credential ConnectionCredential `json:"credential"`
/* Database name. */
Database string `json:"database"`
/* Cloud SQL instance ID in the form project:location:instance. */
InstanceId string `json:"instanceId"`
/* When the connection is used in the context of an operation in BigQuery, this service account will serve as the identity being used for connecting to the CloudSQL instance specified in this connection. */
// +optional
ServiceAccountId *string `json:"serviceAccountId,omitempty"`
/* Type of the Cloud SQL database. Possible values: ["DATABASE_TYPE_UNSPECIFIED", "POSTGRES", "MYSQL"]. */
Type string `json:"type"`
}
type ConnectionCredential struct {
/* Password for database. */
Password ConnectionPassword `json:"password"`
/* Username for database. */
Username string `json:"username"`
}
type ConnectionPassword struct {
/* Value of the field. Cannot be used if 'valueFrom' is specified. */
// +optional
Value *string `json:"value,omitempty"`
/* Source for the field's value. Cannot be used if 'value' is specified. */
// +optional
ValueFrom *ConnectionValueFrom `json:"valueFrom,omitempty"`
}
type ConnectionValueFrom struct {
/* Reference to a value with the given key in the given Secret in the resource's namespace. */
// +optional
SecretKeyRef *v1alpha1.SecretKeyRef `json:"secretKeyRef,omitempty"`
}
type BigQueryConnectionConnectionSpec struct {
/* Connection properties specific to Amazon Web Services. */
// +optional
Aws *ConnectionAws `json:"aws,omitempty"`
/* Container for connection properties specific to Azure. */
// +optional
Azure *ConnectionAzure `json:"azure,omitempty"`
/* Container for connection properties for delegation of access to GCP resources. */
// +optional
CloudResource *ConnectionCloudResource `json:"cloudResource,omitempty"`
/* Connection properties specific to Cloud Spanner. */
// +optional
CloudSpanner *ConnectionCloudSpanner `json:"cloudSpanner,omitempty"`
/* Connection properties specific to the Cloud SQL. */
// +optional
CloudSql *ConnectionCloudSql `json:"cloudSql,omitempty"`
/* A descriptive description for the connection. */
// +optional
Description *string `json:"description,omitempty"`
/* A descriptive name for the connection. */
// +optional
FriendlyName *string `json:"friendlyName,omitempty"`
/* Immutable. The geographic location where the connection should reside.
Cloud SQL instance must be in the same location as the connection
with following exceptions: Cloud SQL us-central1 maps to BigQuery US, Cloud SQL europe-west1 maps to BigQuery EU.
Examples: US, EU, asia-northeast1, us-central1, europe-west1.
Spanner Connections same as spanner region
AWS allowed regions are aws-us-east-1
Azure allowed regions are azure-eastus2. */
Location string `json:"location"`
/* The project that this resource belongs to. */
ProjectRef v1alpha1.ResourceRef `json:"projectRef"`
/* Immutable. Optional. The connectionId of the resource. Used for creation and acquisition. When unset, the value of `metadata.name` is used as the default. */
// +optional
ResourceID *string `json:"resourceID,omitempty"`
}
type BigQueryConnectionConnectionStatus struct {
/* Conditions represent the latest available observations of the
BigQueryConnectionConnection's current state. */
Conditions []v1alpha1.Condition `json:"conditions,omitempty"`
/* True if the connection has credential assigned. */
// +optional
HasCredential *bool `json:"hasCredential,omitempty"`
/* The resource name of the connection in the form of:
"projects/{project_id}/locations/{location_id}/connections/{connectionId}". */
// +optional
Name *string `json:"name,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 *int `json:"observedGeneration,omitempty"`
}
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:resource:categories=gcp,shortName=gcpbigqueryconnectionconnection;gcpbigqueryconnectionconnections
// +kubebuilder:subresource:status
// BigQueryConnectionConnection is the Schema for the bigqueryconnection API
// +k8s:openapi-gen=true
type BigQueryConnectionConnection struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec BigQueryConnectionConnectionSpec `json:"spec,omitempty"`
Status BigQueryConnectionConnectionStatus `json:"status,omitempty"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// BigQueryConnectionConnectionList contains a list of BigQueryConnectionConnection
type BigQueryConnectionConnectionList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []BigQueryConnectionConnection `json:"items"`
}
func init() {
SchemeBuilder.Register(&BigQueryConnectionConnection{}, &BigQueryConnectionConnectionList{})
}