alpha

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Copyright 2022 Google LLC. All Rights Reserved.

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. Package bigquery provices methods and types for managing bigquery GCP resources.

Copyright 2022 Google LLC. All Rights Reserved.

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. Package alpha defines operations in the declarative SDK.

Copyright 2022 Google LLC. All Rights Reserved.

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.

Copyright 2022 Google LLC. All Rights Reserved.

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.

Index

Constants

View Source
const RoutineMaxPage = -1

Variables

View Source
var YAML_routine = []byte("info:\n  title: Bigquery/Routine\n  description: The Bigquery Routine resource\n  x-dcl-struct-name: Routine\n  x-dcl-has-iam: false\npaths:\n  get:\n    description: The function used to get information about a Routine\n    parameters:\n    - name: Routine\n      required: true\n      description: A full instance of a Routine\n  apply:\n    description: The function used to apply information about a Routine\n    parameters:\n    - name: Routine\n      required: true\n      description: A full instance of a Routine\n  delete:\n    description: The function used to delete a Routine\n    parameters:\n    - name: Routine\n      required: true\n      description: A full instance of a Routine\n  deleteAll:\n    description: The function used to delete all Routine\n    parameters:\n    - name: project\n      required: true\n      schema:\n        type: string\n    - name: dataset\n      required: true\n      schema:\n        type: string\n  list:\n    description: The function used to list information about many Routine\n    parameters:\n    - name: project\n      required: true\n      schema:\n        type: string\n    - name: dataset\n      required: true\n      schema:\n        type: string\ncomponents:\n  schemas:\n    ArgumentsDataType:\n      x-dcl-has-iam: false\n      type: object\n      x-dcl-go-name: DataType\n      x-dcl-go-type: RoutineArgumentsDataType\n      description: Required unless argument_kind = ANY_TYPE.\n      x-kubernetes-immutable: true\n      required:\n      - typeKind\n      properties:\n        arrayElementType:\n          $ref: '#/components/schemas/ArgumentsDataType'\n          x-dcl-go-name: ArrayElementType\n          x-kubernetes-immutable: true\n          x-dcl-conflicts:\n          - structType\n        structType:\n          type: object\n          x-dcl-go-name: StructType\n          x-dcl-go-type: RoutineArgumentsDataTypeStructType\n          description: The fields of this struct, in order, if type_kind = \"STRUCT\".\n          x-kubernetes-immutable: true\n          x-dcl-conflicts:\n          - arrayElementType\n          properties:\n            fields:\n              type: array\n              x-dcl-go-name: Fields\n              x-kubernetes-immutable: true\n              x-dcl-send-empty: true\n              x-dcl-list-type: list\n              items:\n                type: object\n                x-dcl-go-type: RoutineArgumentsDataTypeStructTypeFields\n                properties:\n                  name:\n                    type: string\n                    x-dcl-go-name: Name\n                    description: Optional. The name of this field. Can be absent for\n                      struct fields.\n                    x-kubernetes-immutable: true\n                  type:\n                    $ref: '#/components/schemas/ArgumentsDataType'\n                    x-dcl-go-name: Type\n                    x-kubernetes-immutable: true\n        typeKind:\n          type: string\n          x-dcl-go-name: TypeKind\n          x-dcl-go-type: RoutineArgumentsDataTypeTypeKindEnum\n          description: 'Required. The top level type of this field. Can be any standard\n            SQL data type (e.g., \"INT64\", \"DATE\", \"ARRAY\"). Possible values: TYPE_KIND_UNSPECIFIED,\n            INT64, BOOL, FLOAT64, STRING, BYTES, TIMESTAMP, DATE, TIME, DATETIME,\n            INTERVAL, GEOGRAPHY, NUMERIC, BIGNUMERIC, JSON, ARRAY, STRUCT'\n          x-kubernetes-immutable: true\n          enum:\n          - TYPE_KIND_UNSPECIFIED\n          - INT64\n          - BOOL\n          - FLOAT64\n          - STRING\n          - BYTES\n          - TIMESTAMP\n          - DATE\n          - TIME\n          - DATETIME\n          - INTERVAL\n          - GEOGRAPHY\n          - NUMERIC\n          - BIGNUMERIC\n          - JSON\n          - ARRAY\n          - STRUCT\n    Routine:\n      title: Routine\n      x-dcl-id: projects/{{project}}/datasets/{{dataset}}/routines/{{name}}\n      x-dcl-parent-container: project\n      x-dcl-has-iam: false\n      type: object\n      required:\n      - name\n      - project\n      - dataset\n      - routineType\n      - definitionBody\n      properties:\n        arguments:\n          type: array\n          x-dcl-go-name: Arguments\n          description: Optional.\n          x-dcl-send-empty: true\n          x-dcl-list-type: list\n          items:\n            type: object\n            x-dcl-go-type: RoutineArguments\n            properties:\n              argumentKind:\n                type: string\n                x-dcl-go-name: ArgumentKind\n                x-dcl-go-type: RoutineArgumentsArgumentKindEnum\n                description: 'Optional. Defaults to FIXED_TYPE. Possible values: ARGUMENT_KIND_UNSPECIFIED,\n                  FIXED_TYPE, ANY_TYPE'\n                enum:\n                - ARGUMENT_KIND_UNSPECIFIED\n                - FIXED_TYPE\n                - ANY_TYPE\n              dataType:\n                $ref: '#/components/schemas/ArgumentsDataType'\n                x-dcl-go-name: DataType\n                x-kubernetes-immutable: true\n              mode:\n                type: string\n                x-dcl-go-name: Mode\n                x-dcl-go-type: RoutineArgumentsModeEnum\n                description: 'Optional. Specifies whether the argument is input or\n                  output. Can be set for procedures only. Possible values: MODE_UNSPECIFIED,\n                  IN, OUT, INOUT'\n                enum:\n                - MODE_UNSPECIFIED\n                - IN\n                - OUT\n                - INOUT\n              name:\n                type: string\n                x-dcl-go-name: Name\n                description: Optional. The name of this argument. Can be absent for\n                  function return argument.\n        creationTime:\n          type: integer\n          format: int64\n          x-dcl-go-name: CreationTime\n          readOnly: true\n          description: Output only. The time when this routine was created, in milliseconds\n            since the epoch.\n          x-kubernetes-immutable: true\n        dataset:\n          type: string\n          x-dcl-go-name: Dataset\n          description: Required. The ID of the dataset containing this routine.\n          x-dcl-references:\n          - resource: Bigquery/Dataset\n            field: name\n            parent: true\n        definitionBody:\n          type: string\n          x-dcl-go-name: DefinitionBody\n          description: \"Required. The body of the routine. For functions, this is\n            the expression in the AS clause. If language=SQL, it is the substring\n            inside (but excluding) the parentheses. For example, for the function\n            created with the following statement: `CREATE FUNCTION JoinLines(x string,\n            y string) as (concat(x, \\\"\\n\\\", y))` The definition_body is `concat(x,\n            \\\"\\n\\\", y)` (\\n is not replaced with linebreak). If language=JAVASCRIPT,\n            it is the evaluated string in the AS clause. For example, for the function\n            created with the following statement: `CREATE FUNCTION f() RETURNS STRING\n            LANGUAGE js AS 'return \\\"\\n\\\";\\n'` The definition_body is `return \\\"\\n\\\";\\n`\n            Note that both \\n are replaced with linebreaks.\"\n        description:\n          type: string\n          x-dcl-go-name: Description\n          description: Optional. The description of the routine if defined.\n        determinismLevel:\n          type: string\n          x-dcl-go-name: DeterminismLevel\n          x-dcl-go-type: RoutineDeterminismLevelEnum\n          description: 'Optional. The determinism level of the JavaScript UDF if defined.\n            Possible values: DETERMINISM_LEVEL_UNSPECIFIED, DETERMINISTIC, NOT_DETERMINISTIC'\n          enum:\n          - DETERMINISM_LEVEL_UNSPECIFIED\n          - DETERMINISTIC\n          - NOT_DETERMINISTIC\n        etag:\n          type: string\n          x-dcl-go-name: Etag\n          readOnly: true\n          description: Output only. A hash of this resource.\n          x-kubernetes-immutable: true\n        importedLibraries:\n          type: array\n          x-dcl-go-name: ImportedLibraries\n          description: Optional. If language = \"JAVASCRIPT\", this field stores the\n            path of the imported JAVASCRIPT libraries.\n          x-dcl-send-empty: true\n          x-dcl-list-type: list\n          items:\n            type: string\n            x-dcl-go-type: string\n        language:\n          type: string\n          x-dcl-go-name: Language\n          x-dcl-go-type: RoutineLanguageEnum\n          description: 'Optional. Defaults to \"SQL\". Possible values: LANGUAGE_UNSPECIFIED,\n            SQL, JAVASCRIPT'\n          enum:\n          - LANGUAGE_UNSPECIFIED\n          - SQL\n          - JAVASCRIPT\n        lastModifiedTime:\n          type: integer\n          format: int64\n          x-dcl-go-name: LastModifiedTime\n          readOnly: true\n          description: Output only. The time when this routine was last modified,\n            in milliseconds since the epoch.\n          x-kubernetes-immutable: true\n        name:\n          type: string\n          x-dcl-go-name: Name\n          description: Required. The ID of the routine. The ID must contain only letters\n            (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256\n            characters.\n        project:\n          type: string\n          x-dcl-go-name: Project\n          description: Required. The ID of the project containing this routine.\n          x-dcl-references:\n          - resource: Cloudresourcemanager/Project\n            field: name\n            parent: true\n        returnType:\n          $ref: '#/components/schemas/ArgumentsDataType'\n          x-dcl-go-name: ReturnType\n        routineType:\n          type: string\n          x-dcl-go-name: RoutineType\n          x-dcl-go-type: RoutineRoutineTypeEnum\n          description: 'Required. The type of routine. Possible values: ROUTINE_TYPE_UNSPECIFIED,\n            SCALAR_FUNCTION, PROCEDURE'\n          enum:\n          - ROUTINE_TYPE_UNSPECIFIED\n          - SCALAR_FUNCTION\n          - PROCEDURE\n        strictMode:\n          type: boolean\n          x-dcl-go-name: StrictMode\n          description: Optional. Can be set for procedures only. If true (default),\n            the definition body will be validated in the creation and the updates\n            of the procedure. For procedures with an argument of ANY TYPE, the definition\n            body validtion is not supported at creation/update time, and thus this\n            field must be set to false explicitly.\n")

blaze-out/k8-fastbuild/genfiles/cloud/graphite/mmv2/services/google/bigquery/alpha/routine.yaml

Functions

This section is empty.

Types

type Client

type Client struct {
	Config *dcl.Config
}

The Client is the base struct of all operations. This will receive the Get, Delete, List, and Apply operations on all resources.

func NewClient

func NewClient(c *dcl.Config) *Client

NewClient creates a client that retries all operations a few times each.

func (*Client) ApplyRoutine

func (c *Client) ApplyRoutine(ctx context.Context, rawDesired *Routine, opts ...dcl.ApplyOption) (*Routine, error)

func (*Client) DeleteAllRoutine

func (c *Client) DeleteAllRoutine(ctx context.Context, project, dataset string, filter func(*Routine) bool) error

DeleteAllRoutine deletes all resources that the filter functions returns true on.

func (*Client) DeleteRoutine

func (c *Client) DeleteRoutine(ctx context.Context, r *Routine) error

func (*Client) GetRoutine

func (c *Client) GetRoutine(ctx context.Context, r *Routine) (*Routine, error)

func (*Client) ListRoutine

func (c *Client) ListRoutine(ctx context.Context, project, dataset string) (*RoutineList, error)

func (*Client) ListRoutineWithMaxResults

func (c *Client) ListRoutineWithMaxResults(ctx context.Context, project, dataset string, pageSize int32) (*RoutineList, error)

type Routine

type Routine struct {
	Etag              *string                      `json:"etag"`
	Name              *string                      `json:"name"`
	Project           *string                      `json:"project"`
	Dataset           *string                      `json:"dataset"`
	RoutineType       *RoutineRoutineTypeEnum      `json:"routineType"`
	CreationTime      *int64                       `json:"creationTime"`
	LastModifiedTime  *int64                       `json:"lastModifiedTime"`
	Language          *RoutineLanguageEnum         `json:"language"`
	Arguments         []RoutineArguments           `json:"arguments"`
	ReturnType        *RoutineArgumentsDataType    `json:"returnType"`
	ImportedLibraries []string                     `json:"importedLibraries"`
	DefinitionBody    *string                      `json:"definitionBody"`
	Description       *string                      `json:"description"`
	DeterminismLevel  *RoutineDeterminismLevelEnum `json:"determinismLevel"`
	StrictMode        *bool                        `json:"strictMode"`
}

func (*Routine) Describe

func (r *Routine) Describe() dcl.ServiceTypeVersion

Describe returns a simple description of this resource to ensure that automated tools can identify it.

func (*Routine) ID

func (r *Routine) ID() (string, error)

func (*Routine) String

func (r *Routine) String() string

type RoutineArguments

type RoutineArguments struct {
	Name         *string                           `json:"name"`
	ArgumentKind *RoutineArgumentsArgumentKindEnum `json:"argumentKind"`
	Mode         *RoutineArgumentsModeEnum         `json:"mode"`
	DataType     *RoutineArgumentsDataType         `json:"dataType"`
	// contains filtered or unexported fields
}
var EmptyRoutineArguments *RoutineArguments = &RoutineArguments{empty: true}

This object is used to assert a desired state where this RoutineArguments is empty. Go lacks global const objects, but this object should be treated as one. Modifying this object will have undesirable results.

func (*RoutineArguments) Empty

func (r *RoutineArguments) Empty() bool

func (*RoutineArguments) HashCode

func (r *RoutineArguments) HashCode() string

func (*RoutineArguments) String

func (r *RoutineArguments) String() string

func (*RoutineArguments) UnmarshalJSON

func (r *RoutineArguments) UnmarshalJSON(data []byte) error

type RoutineArgumentsArgumentKindEnum

type RoutineArgumentsArgumentKindEnum string

The enum RoutineArgumentsArgumentKindEnum.

func RoutineArgumentsArgumentKindEnumRef

func RoutineArgumentsArgumentKindEnumRef(s string) *RoutineArgumentsArgumentKindEnum

RoutineArgumentsArgumentKindEnumRef returns a *RoutineArgumentsArgumentKindEnum with the value of string s If the empty string is provided, nil is returned.

func (RoutineArgumentsArgumentKindEnum) Validate

type RoutineArgumentsDataType

type RoutineArgumentsDataType struct {
	TypeKind         *RoutineArgumentsDataTypeTypeKindEnum `json:"typeKind"`
	ArrayElementType *RoutineArgumentsDataType             `json:"arrayElementType"`
	StructType       *RoutineArgumentsDataTypeStructType   `json:"structType"`
	// contains filtered or unexported fields
}
var EmptyRoutineArgumentsDataType *RoutineArgumentsDataType = &RoutineArgumentsDataType{empty: true}

This object is used to assert a desired state where this RoutineArgumentsDataType is empty. Go lacks global const objects, but this object should be treated as one. Modifying this object will have undesirable results.

func (*RoutineArgumentsDataType) Empty

func (r *RoutineArgumentsDataType) Empty() bool

func (*RoutineArgumentsDataType) HashCode

func (r *RoutineArgumentsDataType) HashCode() string

func (*RoutineArgumentsDataType) String

func (r *RoutineArgumentsDataType) String() string

func (*RoutineArgumentsDataType) UnmarshalJSON

func (r *RoutineArgumentsDataType) UnmarshalJSON(data []byte) error

type RoutineArgumentsDataTypeStructType

type RoutineArgumentsDataTypeStructType struct {
	Fields []RoutineArgumentsDataTypeStructTypeFields `json:"fields"`
	// contains filtered or unexported fields
}
var EmptyRoutineArgumentsDataTypeStructType *RoutineArgumentsDataTypeStructType = &RoutineArgumentsDataTypeStructType{empty: true}

This object is used to assert a desired state where this RoutineArgumentsDataTypeStructType is empty. Go lacks global const objects, but this object should be treated as one. Modifying this object will have undesirable results.

func (*RoutineArgumentsDataTypeStructType) Empty

func (*RoutineArgumentsDataTypeStructType) HashCode

func (*RoutineArgumentsDataTypeStructType) String

func (*RoutineArgumentsDataTypeStructType) UnmarshalJSON

func (r *RoutineArgumentsDataTypeStructType) UnmarshalJSON(data []byte) error

type RoutineArgumentsDataTypeStructTypeFields

type RoutineArgumentsDataTypeStructTypeFields struct {
	Name *string                   `json:"name"`
	Type *RoutineArgumentsDataType `json:"type"`
	// contains filtered or unexported fields
}
var EmptyRoutineArgumentsDataTypeStructTypeFields *RoutineArgumentsDataTypeStructTypeFields = &RoutineArgumentsDataTypeStructTypeFields{empty: true}

This object is used to assert a desired state where this RoutineArgumentsDataTypeStructTypeFields is empty. Go lacks global const objects, but this object should be treated as one. Modifying this object will have undesirable results.

func (*RoutineArgumentsDataTypeStructTypeFields) Empty

func (*RoutineArgumentsDataTypeStructTypeFields) HashCode

func (*RoutineArgumentsDataTypeStructTypeFields) String

func (*RoutineArgumentsDataTypeStructTypeFields) UnmarshalJSON

func (r *RoutineArgumentsDataTypeStructTypeFields) UnmarshalJSON(data []byte) error

type RoutineArgumentsDataTypeTypeKindEnum

type RoutineArgumentsDataTypeTypeKindEnum string

The enum RoutineArgumentsDataTypeTypeKindEnum.

func RoutineArgumentsDataTypeTypeKindEnumRef

func RoutineArgumentsDataTypeTypeKindEnumRef(s string) *RoutineArgumentsDataTypeTypeKindEnum

RoutineArgumentsDataTypeTypeKindEnumRef returns a *RoutineArgumentsDataTypeTypeKindEnum with the value of string s If the empty string is provided, nil is returned.

func (RoutineArgumentsDataTypeTypeKindEnum) Validate

type RoutineArgumentsModeEnum

type RoutineArgumentsModeEnum string

The enum RoutineArgumentsModeEnum.

func RoutineArgumentsModeEnumRef

func RoutineArgumentsModeEnumRef(s string) *RoutineArgumentsModeEnum

RoutineArgumentsModeEnumRef returns a *RoutineArgumentsModeEnum with the value of string s If the empty string is provided, nil is returned.

func (RoutineArgumentsModeEnum) Validate

func (v RoutineArgumentsModeEnum) Validate() error

type RoutineDeterminismLevelEnum

type RoutineDeterminismLevelEnum string

The enum RoutineDeterminismLevelEnum.

func RoutineDeterminismLevelEnumRef

func RoutineDeterminismLevelEnumRef(s string) *RoutineDeterminismLevelEnum

RoutineDeterminismLevelEnumRef returns a *RoutineDeterminismLevelEnum with the value of string s If the empty string is provided, nil is returned.

func (RoutineDeterminismLevelEnum) Validate

func (v RoutineDeterminismLevelEnum) Validate() error

type RoutineLanguageEnum

type RoutineLanguageEnum string

The enum RoutineLanguageEnum.

func RoutineLanguageEnumRef

func RoutineLanguageEnumRef(s string) *RoutineLanguageEnum

RoutineLanguageEnumRef returns a *RoutineLanguageEnum with the value of string s If the empty string is provided, nil is returned.

func (RoutineLanguageEnum) Validate

func (v RoutineLanguageEnum) Validate() error

type RoutineList

type RoutineList struct {
	Items []*Routine
	// contains filtered or unexported fields
}

func (*RoutineList) HasNext

func (l *RoutineList) HasNext() bool

func (*RoutineList) Next

func (l *RoutineList) Next(ctx context.Context, c *Client) error

type RoutineRoutineTypeEnum

type RoutineRoutineTypeEnum string

The enum RoutineRoutineTypeEnum.

func RoutineRoutineTypeEnumRef

func RoutineRoutineTypeEnumRef(s string) *RoutineRoutineTypeEnum

RoutineRoutineTypeEnumRef returns a *RoutineRoutineTypeEnum with the value of string s If the empty string is provided, nil is returned.

func (RoutineRoutineTypeEnum) Validate

func (v RoutineRoutineTypeEnum) Validate() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL