diff --git a/api/api_templates.gen.go b/api/api_templates.gen.go index a36a1fb..d2fa1e2 100644 --- a/api/api_templates.gen.go +++ b/api/api_templates.gen.go @@ -25,6 +25,19 @@ var ( type TemplatesApi interface { + /* + * ApplyTemplate Apply or dry-run an InfluxDB Template + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @return ApiApplyTemplateRequest + */ + ApplyTemplate(ctx _context.Context) ApiApplyTemplateRequest + + /* + * ApplyTemplateExecute executes the request + * @return TemplateSummary + */ + ApplyTemplateExecute(r ApiApplyTemplateRequest) (TemplateSummary, error) + /* * ExportTemplate Export a new Influx Template * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @@ -62,6 +75,148 @@ func (a *TemplatesApiService) OnlyCloud() TemplatesApi { return a } +type ApiApplyTemplateRequest struct { + ctx _context.Context + ApiService TemplatesApi + templateApply *TemplateApply +} + +func (r ApiApplyTemplateRequest) TemplateApply(templateApply TemplateApply) ApiApplyTemplateRequest { + r.templateApply = &templateApply + return r +} +func (r ApiApplyTemplateRequest) GetTemplateApply() *TemplateApply { + return r.templateApply +} + +func (r ApiApplyTemplateRequest) Execute() (TemplateSummary, error) { + return r.ApiService.ApplyTemplateExecute(r) +} + +/* + * ApplyTemplate Apply or dry-run an InfluxDB Template + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @return ApiApplyTemplateRequest + */ +func (a *TemplatesApiService) ApplyTemplate(ctx _context.Context) ApiApplyTemplateRequest { + return ApiApplyTemplateRequest{ + ApiService: a, + ctx: ctx, + } +} + +/* + * Execute executes the request + * @return TemplateSummary + */ +func (a *TemplatesApiService) ApplyTemplateExecute(r ApiApplyTemplateRequest) (TemplateSummary, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPost + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue TemplateSummary + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TemplatesApiService.ApplyTemplate") + if err != nil { + return localVarReturnValue, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/templates/apply" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + if r.templateApply == nil { + return localVarReturnValue, reportError("templateApply is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.templateApply + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + var errorPrefix string + if a.isOnlyOSS { + errorPrefix = "InfluxDB OSS-only command failed: " + } else if a.isOnlyCloud { + errorPrefix = "InfluxDB Cloud-only command failed: " + } + + if localVarHTTPResponse.StatusCode >= 300 { + body, err := GunzipIfNeeded(localVarHTTPResponse) + if err != nil { + body.Close() + return localVarReturnValue, _fmt.Errorf("%s%w", errorPrefix, err) + } + localVarBody, err := _ioutil.ReadAll(body) + body.Close() + if err != nil { + return localVarReturnValue, _fmt.Errorf("%s%w", errorPrefix, err) + } + newErr := GenericOpenAPIError{ + body: localVarBody, + error: _fmt.Sprintf("%s%s", errorPrefix, localVarHTTPResponse.Status), + } + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = _fmt.Sprintf("%s%v", errorPrefix, err.Error()) + return localVarReturnValue, newErr + } + newErr.model = &v + newErr.error = _fmt.Sprintf("%s%v", errorPrefix, v.Error()) + return localVarReturnValue, newErr + } + + body, err := GunzipIfNeeded(localVarHTTPResponse) + if err != nil { + body.Close() + return localVarReturnValue, _fmt.Errorf("%s%w", errorPrefix, err) + } + localVarBody, err := _ioutil.ReadAll(body) + body.Close() + if err != nil { + return localVarReturnValue, _fmt.Errorf("%s%w", errorPrefix, err) + } + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: _fmt.Sprintf("%s%s", errorPrefix, err.Error()), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + type ApiExportTemplateRequest struct { ctx _context.Context ApiService TemplatesApi diff --git a/api/contract/cli.yml b/api/contract/cli.yml index 18e1eb5..706298b 100644 --- a/api/contract/cli.yml +++ b/api/contract/cli.yml @@ -77,6 +77,8 @@ paths: $ref: "./overrides/paths/dashboards.yml" /templates/export: $ref: "./overrides/paths/templates_export.yml" + /templates/apply: + $ref: "./overrides/paths/templates_apply.yml" /dbrps: $ref: "./openapi/src/common/paths/dbrps.yml" "/dbrps/{dbrpID}": @@ -269,6 +271,88 @@ components: $ref: "./overrides/schemas/Template.yml" TemplateEntry: $ref: "./overrides/schemas/TemplateEntry.yml" + TemplateApply: + $ref: "./overrides/schemas/TemplateApply.yml" + TemplateApplyTemplate: + $ref: "./overrides/schemas/TemplateApplyTemplate.yml" + TemplateApplyRemoteRef: + $ref: "./overrides/schemas/TemplateApplyRemoteRef.yml" + TemplateApplyAction: + $ref: "./overrides/schemas/TemplateApplyAction.yml" + TemplateApplyActionKind: + $ref: "./overrides/schemas/TemplateApplyActionKind.yml" + TemplateSummary: + $ref: "./overrides/schemas/TemplateSummary.yml" + TemplateSummaryResources: + $ref: "./overrides/schemas/TemplateSummaryResources.yml" + TemplateSummaryError: + $ref: "./overrides/schemas/TemplateSummaryError.yml" + TemplateSummaryBucket: + $ref: "./overrides/schemas/TemplateSummaryBucket.yml" + TemplateSummaryCheck: + $ref: "./overrides/schemas/TemplateSummaryCheck.yml" + TemplateSummaryCommon: + $ref: "./overrides/schemas/TemplateSummaryCommon.yml" + TemplateSummaryCore: + $ref: "./overrides/schemas/TemplateSummaryCore.yml" + TemplateEnvReference: + $ref: "./overrides/schemas/TemplateEnvReference.yml" + TemplateSummaryDashboard: + $ref: "./overrides/schemas/TemplateSummaryDashboard.yml" + TemplateSummaryLabel: + $ref: "./overrides/schemas/TemplateSummaryLabel.yml" + TemplateSummaryLabelMapping: + $ref: "./overrides/schemas/TemplateSummaryLabelMapping.yml" + TemplateSummaryNotificationEndpoint: + $ref: "./overrides/schemas/TemplateSummaryNotificationEndpoint.yml" + TemplateSummaryNotificationRule: + $ref: "./overrides/schemas/TemplateSummaryNotificationRule.yml" + TemplateSummaryTask: + $ref: "./overrides/schemas/TemplateSummaryTask.yml" + TemplateSummaryTelegraf: + $ref: "./overrides/schemas/TemplateSummaryTelegraf.yml" + TemplateSummaryTelegrafConfig: + $ref: "./overrides/schemas/TemplateSummaryTelegrafConfig.yml" + TemplateSummaryVariable: + $ref: "./overrides/schemas/TemplateSummaryVariable.yml" + TemplateSummaryVariableArgs: + $ref: "./overrides/schemas/TemplateSummaryVariableArgs.yml" + TemplateSummaryDiff: + $ref: "./overrides/schemas/TemplateSummaryDiff.yml" + TemplateSummaryDiffBucket: + $ref: "./overrides/schemas/TemplateSummaryDiffBucket.yml" + TemplateSummaryDiffBucketFields: + $ref: "./overrides/schemas/TemplateSummaryDiffBucketFields.yml" + TemplateSummaryDiffCheck: + $ref: "./overrides/schemas/TemplateSummaryDiffCheck.yml" + TemplateSummaryDiffCheckFields: + $ref: "./overrides/schemas/TemplateSummaryDiffCheckFields.yml" + TemplateSummaryDiffDashboard: + $ref: "./overrides/schemas/TemplateSummaryDiffDashboard.yml" + TemplateSummaryDiffDashboardFields: + $ref: "./overrides/schemas/TemplateSummaryDiffDashboardFields.yml" + TemplateSummaryDiffLabel: + $ref: "./overrides/schemas/TemplateSummaryDiffLabel.yml" + TemplateSummaryDiffLabelFields: + $ref: "./overrides/schemas/TemplateSummaryDiffLabelFields.yml" + TemplateSummaryDiffNotificationEndpoint: + $ref: "./overrides/schemas/TemplateSummaryDiffNotificationEndpoint.yml" + TemplateSummaryDiffNotificationEndpointFields: + $ref: "./overrides/schemas/TemplateSummaryDiffNotificationEndpointFields.yml" + TemplateSummaryDiffNotificationRule: + $ref: "./overrides/schemas/TemplateSummaryDiffNotificationRule.yml" + TemplateSummaryDiffNotificationRuleFields: + $ref: "./overrides/schemas/TemplateSummaryDiffNotificationRuleFields.yml" + TemplateSummaryDiffTask: + $ref: "./overrides/schemas/TemplateSummaryDiffTask.yml" + TemplateSummaryDiffTaskFields: + $ref: "./overrides/schemas/TemplateSummaryDiffTaskFields.yml" + TemplateSummaryDiffTelegraf: + $ref: "./overrides/schemas/TemplateSummaryDiffTelegraf.yml" + TemplateSummaryDiffVariable: + $ref: "./overrides/schemas/TemplateSummaryDiffVariable.yml" + TemplateSummaryDiffVariableFields: + $ref: "./overrides/schemas/TemplateSummaryDiffVariableFields.yml" SecretKeysResponse: $ref: "./openapi/src/common/schemas/SecretKeysResponse.yml" SecretKeys: diff --git a/api/contract/overrides/paths/templates_apply.yml b/api/contract/overrides/paths/templates_apply.yml new file mode 100644 index 0000000..ae99288 --- /dev/null +++ b/api/contract/overrides/paths/templates_apply.yml @@ -0,0 +1,37 @@ +post: + operationId: ApplyTemplate + tags: + - Templates + summary: Apply or dry-run an InfluxDB Template + requestBody: + required: true + content: + application/json: + schema: + $ref: "../schemas/TemplateApply.yml" + responses: + "200": + description: > + Influx package dry-run successful, no new resources created. + The provided diff and summary will not have IDs for resources + that do not exist at the time of the dry run. + content: + application/json: + schema: + $ref: "../schemas/TemplateSummary.yml" + "201": + description: > + Influx package applied successfully. Newly created resources created + available in summary. The diff compares the state of the world before + the package is applied with the changes the application will impose. + This corresponds to `"dryRun": true` + content: + application/json: + schema: + $ref: "../schemas/TemplateSummary.yml" + default: + description: Unexpected error + content: + application/json: + schema: + $ref: "../../openapi/src/common/schemas/Error.yml" diff --git a/api/contract/overrides/schemas/TemplateApply.yml b/api/contract/overrides/schemas/TemplateApply.yml new file mode 100644 index 0000000..7c9b211 --- /dev/null +++ b/api/contract/overrides/schemas/TemplateApply.yml @@ -0,0 +1,30 @@ +type: object +properties: + dryRun: + type: boolean + orgID: + type: string + stackID: + type: string + template: + $ref: "./TemplateApplyTemplate.yml" + templates: + type: array + items: + $ref: "./TemplateApplyTemplate.yml" + envRefs: + type: object + additionalProperties: true + secrets: + type: object + additionalProperties: + type: string + remotes: + type: array + items: + $ref: "./TemplateApplyRemoteRef.yml" + actions: + type: array + items: + $ref: "./TemplateApplyAction.yml" +required: [dryRun, orgID, templates, remotes, actions] diff --git a/api/contract/overrides/schemas/TemplateApplyAction.yml b/api/contract/overrides/schemas/TemplateApplyAction.yml new file mode 100644 index 0000000..b241e2f --- /dev/null +++ b/api/contract/overrides/schemas/TemplateApplyAction.yml @@ -0,0 +1,13 @@ +type: object +properties: + action: + $ref: "./TemplateApplyActionKind.yml" + properties: + type: object + properties: + kind: + type: string + resourceTemplateName: + type: string + required: [kind] +required: [action, properties] diff --git a/api/contract/overrides/schemas/TemplateApplyActionKind.yml b/api/contract/overrides/schemas/TemplateApplyActionKind.yml new file mode 100644 index 0000000..3bc520b --- /dev/null +++ b/api/contract/overrides/schemas/TemplateApplyActionKind.yml @@ -0,0 +1,4 @@ +type: string +enum: + - skipKind + - skipResource diff --git a/api/contract/overrides/schemas/TemplateApplyRemoteRef.yml b/api/contract/overrides/schemas/TemplateApplyRemoteRef.yml new file mode 100644 index 0000000..1bf60c8 --- /dev/null +++ b/api/contract/overrides/schemas/TemplateApplyRemoteRef.yml @@ -0,0 +1,7 @@ +type: object +properties: + url: + type: string + contentType: + type: string +required: [url] diff --git a/api/contract/overrides/schemas/TemplateApplyTemplate.yml b/api/contract/overrides/schemas/TemplateApplyTemplate.yml new file mode 100644 index 0000000..3740113 --- /dev/null +++ b/api/contract/overrides/schemas/TemplateApplyTemplate.yml @@ -0,0 +1,9 @@ +type: object +properties: + sources: + type: array + items: + type: string + contents: + $ref: "./Template.yml" +required: [sources, contents] diff --git a/api/contract/overrides/schemas/TemplateEntry.yml b/api/contract/overrides/schemas/TemplateEntry.yml index 59022a1..5d0bcc0 100644 --- a/api/contract/overrides/schemas/TemplateEntry.yml +++ b/api/contract/overrides/schemas/TemplateEntry.yml @@ -9,5 +9,7 @@ properties: properties: name: type: string + required: [name] spec: type: object +required: [apiVersion, kind, meta, spec] diff --git a/api/contract/overrides/schemas/TemplateEnvReference.yml b/api/contract/overrides/schemas/TemplateEnvReference.yml new file mode 100644 index 0000000..6355f47 --- /dev/null +++ b/api/contract/overrides/schemas/TemplateEnvReference.yml @@ -0,0 +1,15 @@ +type: object +properties: + resourceField: + type: string + description: Field the environment reference corresponds too + envRefKey: + type: string + description: Key identified as environment reference and is the key identified in the template + value: + description: Value provided to fulfill reference + nullable: true + defaultValue: + description: Default value that will be provided for the reference when no value is provided + nullable: true +required: [resourceField, envRefKey] diff --git a/api/contract/overrides/schemas/TemplateSummary.yml b/api/contract/overrides/schemas/TemplateSummary.yml new file mode 100644 index 0000000..2fd3dae --- /dev/null +++ b/api/contract/overrides/schemas/TemplateSummary.yml @@ -0,0 +1,17 @@ +type: object +properties: + sources: + type: array + items: + type: string + stackID: + type: string + summary: + $ref: "./TemplateSummaryResources.yml" + diff: + $ref: "./TemplateSummaryDiff.yml" + errors: + type: array + items: + $ref: "./TemplateSummaryError.yml" +required: [sources, stackID, summary, diff, errors] diff --git a/api/contract/overrides/schemas/TemplateSummaryBucket.yml b/api/contract/overrides/schemas/TemplateSummaryBucket.yml new file mode 100644 index 0000000..cbc4120 --- /dev/null +++ b/api/contract/overrides/schemas/TemplateSummaryBucket.yml @@ -0,0 +1,16 @@ +allOf: + - $ref: "./TemplateSummaryCommon.yml" + - type: object + properties: + id: + type: string + name: + type: string + description: + type: string + retentionPeriod: + type: integer + schemaType: + type: string + + required: [id, name, retentionPeriod] diff --git a/api/contract/overrides/schemas/TemplateSummaryCheck.yml b/api/contract/overrides/schemas/TemplateSummaryCheck.yml new file mode 100644 index 0000000..9005d07 --- /dev/null +++ b/api/contract/overrides/schemas/TemplateSummaryCheck.yml @@ -0,0 +1,11 @@ +allOf: + - $ref: "./TemplateSummaryCommon.yml" + - type: object + properties: + id: + type: string + name: + type: string + description: + type: string + required: [id, name] diff --git a/api/contract/overrides/schemas/TemplateSummaryCommon.yml b/api/contract/overrides/schemas/TemplateSummaryCommon.yml new file mode 100644 index 0000000..7aaa44e --- /dev/null +++ b/api/contract/overrides/schemas/TemplateSummaryCommon.yml @@ -0,0 +1,9 @@ +allOf: + - $ref: "./TemplateSummaryCore.yml" + - type: object + properties: + labelAssociations: + type: array + items: + $ref: "./TemplateSummaryLabel.yml" + required: [labelAssociations] diff --git a/api/contract/overrides/schemas/TemplateSummaryCore.yml b/api/contract/overrides/schemas/TemplateSummaryCore.yml new file mode 100644 index 0000000..729aae4 --- /dev/null +++ b/api/contract/overrides/schemas/TemplateSummaryCore.yml @@ -0,0 +1,11 @@ +type: object +properties: + kind: + type: string + templateMetaName: + type: string + envReferences: + type: array + items: + $ref: "./TemplateEnvReference.yml" +required: [kind, tempateMetaName, envReferences] diff --git a/api/contract/overrides/schemas/TemplateSummaryDashboard.yml b/api/contract/overrides/schemas/TemplateSummaryDashboard.yml new file mode 100644 index 0000000..ffbbafb --- /dev/null +++ b/api/contract/overrides/schemas/TemplateSummaryDashboard.yml @@ -0,0 +1,11 @@ +allOf: + - $ref: "./TemplateSummaryCommon.yml" + - type: object + properties: + id: + type: "string" + name: + type: "string" + description: + type: "string" + required: [id, name] diff --git a/api/contract/overrides/schemas/TemplateSummaryDiff.yml b/api/contract/overrides/schemas/TemplateSummaryDiff.yml new file mode 100644 index 0000000..db8b7fd --- /dev/null +++ b/api/contract/overrides/schemas/TemplateSummaryDiff.yml @@ -0,0 +1,53 @@ +type: object +properties: + buckets: + type: array + items: + $ref: "./TemplateSummaryDiffBucket.yml" + checks: + type: array + items: + $ref: "./TemplateSummaryDiffCheck.yml" + dashboards: + type: array + items: + $ref: "./TemplateSummaryDiffDashboard.yml" + labels: + type: array + items: + $ref: "./TemplateSummaryDiffLabel.yml" + labelMappings: + type: array + items: + $ref: "./TemplateSummaryLabelMapping.yml" + notificationEndpoints: + type: array + items: + $ref: "./TemplateSummaryDiffNotificationEndpoint.yml" + notificationRules: + type: array + items: + $ref: "./TemplateSummaryDiffNotificationRule.yml" + tasks: + type: array + items: + $ref: "./TemplateSummaryDiffTask.yml" + telegrafConfigs: + type: array + items: + $ref: "./TemplateSummaryDiffTelegraf.yml" + variables: + type: array + items: + $ref: "./TemplateSummaryDiffVariable.yml" +required: + - buckets + - checks + - dashboards + - labels + - labelMappings + - notificationEndpoints + - notificationRules + - tasks + - telegrafConfigs + - variables diff --git a/api/contract/overrides/schemas/TemplateSummaryDiffBucket.yml b/api/contract/overrides/schemas/TemplateSummaryDiffBucket.yml new file mode 100644 index 0000000..94d0af4 --- /dev/null +++ b/api/contract/overrides/schemas/TemplateSummaryDiffBucket.yml @@ -0,0 +1,15 @@ +type: object +properties: + kind: + type: string + stateStatus: + type: string + id: + type: string + templateMetaName: + type: string + new: + $ref: "./TemplateSummaryDiffBucketFields.yml" + old: + $ref: "./TemplateSummaryDiffBucketFields.yml" +required: [kind, stateStatus, id, templateMetaName] diff --git a/api/contract/overrides/schemas/TemplateSummaryDiffBucketFields.yml b/api/contract/overrides/schemas/TemplateSummaryDiffBucketFields.yml new file mode 100644 index 0000000..618f382 --- /dev/null +++ b/api/contract/overrides/schemas/TemplateSummaryDiffBucketFields.yml @@ -0,0 +1,9 @@ +type: object +properties: + name: + type: string + description: + type: string + retentionRules: + $ref: "../../openapi/src/common/schemas/RetentionRules.yml" +required: [name, retentionRules] diff --git a/api/contract/overrides/schemas/TemplateSummaryDiffCheck.yml b/api/contract/overrides/schemas/TemplateSummaryDiffCheck.yml new file mode 100644 index 0000000..cea6153 --- /dev/null +++ b/api/contract/overrides/schemas/TemplateSummaryDiffCheck.yml @@ -0,0 +1,15 @@ +type: object +properties: + kind: + type: string + stateStatus: + type: string + id: + type: string + templateMetaName: + type: string + new: + $ref: "./TemplateSummaryDiffCheckFields.yml" + old: + $ref: "./TemplateSummaryDiffCheckFields.yml" +required: [kind, stateStatus, id, templateMetaName] diff --git a/api/contract/overrides/schemas/TemplateSummaryDiffCheckFields.yml b/api/contract/overrides/schemas/TemplateSummaryDiffCheckFields.yml new file mode 100644 index 0000000..62f90b3 --- /dev/null +++ b/api/contract/overrides/schemas/TemplateSummaryDiffCheckFields.yml @@ -0,0 +1,7 @@ +type: object +properties: + name: + type: string + description: + type: string +required: [name] diff --git a/api/contract/overrides/schemas/TemplateSummaryDiffDashboard.yml b/api/contract/overrides/schemas/TemplateSummaryDiffDashboard.yml new file mode 100644 index 0000000..2315905 --- /dev/null +++ b/api/contract/overrides/schemas/TemplateSummaryDiffDashboard.yml @@ -0,0 +1,15 @@ +type: object +properties: + stateStatus: + type: string + id: + type: string + kind: + type: string + templateMetaName: + type: string + new: + $ref: "./TemplateSummaryDiffDashboardFields.yml" + old: + $ref: "./TemplateSummaryDiffDashboardFields.yml" +required: [kind, stateStatus, id, templateMetaName] diff --git a/api/contract/overrides/schemas/TemplateSummaryDiffDashboardFields.yml b/api/contract/overrides/schemas/TemplateSummaryDiffDashboardFields.yml new file mode 100644 index 0000000..e7e26ab --- /dev/null +++ b/api/contract/overrides/schemas/TemplateSummaryDiffDashboardFields.yml @@ -0,0 +1,11 @@ +type: object +properties: + name: + type: string + description: + type: string + charts: + type: array + items: + type: object +required: [name, charts] diff --git a/api/contract/overrides/schemas/TemplateSummaryDiffLabel.yml b/api/contract/overrides/schemas/TemplateSummaryDiffLabel.yml new file mode 100644 index 0000000..d70b809 --- /dev/null +++ b/api/contract/overrides/schemas/TemplateSummaryDiffLabel.yml @@ -0,0 +1,15 @@ +type: object +properties: + stateStatus: + type: string + kind: + type: string + id: + type: string + templateMetaName: + type: string + new: + $ref: "./TemplateSummaryDiffLabelFields.yml" + old: + $ref: "./TemplateSummaryDiffLabelFields.yml" +required: [kind, stateStatus, id, templateMetaName] diff --git a/api/contract/overrides/schemas/TemplateSummaryDiffLabelFields.yml b/api/contract/overrides/schemas/TemplateSummaryDiffLabelFields.yml new file mode 100644 index 0000000..eab137f --- /dev/null +++ b/api/contract/overrides/schemas/TemplateSummaryDiffLabelFields.yml @@ -0,0 +1,9 @@ +type: object +properties: + name: + type: string + color: + type: string + description: + type: string +required: [name, color] diff --git a/api/contract/overrides/schemas/TemplateSummaryDiffNotificationEndpoint.yml b/api/contract/overrides/schemas/TemplateSummaryDiffNotificationEndpoint.yml new file mode 100644 index 0000000..1bf33e3 --- /dev/null +++ b/api/contract/overrides/schemas/TemplateSummaryDiffNotificationEndpoint.yml @@ -0,0 +1,15 @@ +type: object +properties: + kind: + type: string + stateStatus: + type: string + id: + type: string + templateMetaName: + type: string + new: + $ref: "./TemplateSummaryDiffNotificationEndpointFields.yml" + old: + $ref: "./TemplateSummaryDiffNotificationEndpointFields.yml" +required: [kind, stateStatus, id, templateMetaName] diff --git a/api/contract/overrides/schemas/TemplateSummaryDiffNotificationEndpointFields.yml b/api/contract/overrides/schemas/TemplateSummaryDiffNotificationEndpointFields.yml new file mode 100644 index 0000000..7dabd7a --- /dev/null +++ b/api/contract/overrides/schemas/TemplateSummaryDiffNotificationEndpointFields.yml @@ -0,0 +1,5 @@ +type: object +properties: + name: + type: string +required: [name] diff --git a/api/contract/overrides/schemas/TemplateSummaryDiffNotificationRule.yml b/api/contract/overrides/schemas/TemplateSummaryDiffNotificationRule.yml new file mode 100644 index 0000000..37eedb1 --- /dev/null +++ b/api/contract/overrides/schemas/TemplateSummaryDiffNotificationRule.yml @@ -0,0 +1,15 @@ +type: object +properties: + kind: + type: string + stateStatus: + type: string + id: + type: string + templateMetaName: + type: string + new: + $ref: "./TemplateSummaryDiffNotificationRuleFields.yml" + old: + $ref: "./TemplateSummaryDiffNotificationRuleFields.yml" +required: [kind, stateStatus, id, templateMetaName] diff --git a/api/contract/overrides/schemas/TemplateSummaryDiffNotificationRuleFields.yml b/api/contract/overrides/schemas/TemplateSummaryDiffNotificationRuleFields.yml new file mode 100644 index 0000000..92f9be4 --- /dev/null +++ b/api/contract/overrides/schemas/TemplateSummaryDiffNotificationRuleFields.yml @@ -0,0 +1,19 @@ +type: object +properties: + name: + type: string + description: + type: string + endpointName: + type: string + endpointID: + type: string + endpointType: + type: string + every: + type: string + offset: + type: string + messageTemplate: + type: string +required: [name, endpointName, endpointID, endpointType, every, offset] diff --git a/api/contract/overrides/schemas/TemplateSummaryDiffTask.yml b/api/contract/overrides/schemas/TemplateSummaryDiffTask.yml new file mode 100644 index 0000000..cc3e481 --- /dev/null +++ b/api/contract/overrides/schemas/TemplateSummaryDiffTask.yml @@ -0,0 +1,15 @@ +type: object +properties: + kind: + type: string + stateStatus: + type: string + id: + type: string + templateMetaName: + type: string + new: + $ref: "./TemplateSummaryDiffTaskFields.yml" + old: + $ref: "./TemplateSummaryDiffTaskFields.yml" +required: [kind, stateStatus, id, templateMetaName] diff --git a/api/contract/overrides/schemas/TemplateSummaryDiffTaskFields.yml b/api/contract/overrides/schemas/TemplateSummaryDiffTaskFields.yml new file mode 100644 index 0000000..516e07c --- /dev/null +++ b/api/contract/overrides/schemas/TemplateSummaryDiffTaskFields.yml @@ -0,0 +1,17 @@ +type: object +properties: + name: + type: string + cron: + type: string + description: + type: string + every: + type: string + offset: + type: string + query: + type: string + status: + type: string +required: [name, status] diff --git a/api/contract/overrides/schemas/TemplateSummaryDiffTelegraf.yml b/api/contract/overrides/schemas/TemplateSummaryDiffTelegraf.yml new file mode 100644 index 0000000..1d4ca8a --- /dev/null +++ b/api/contract/overrides/schemas/TemplateSummaryDiffTelegraf.yml @@ -0,0 +1,15 @@ +type: object +properties: + kind: + type: string + stateStatus: + type: string + id: + type: string + templateMetaName: + type: string + new: + $ref: "./TemplateSummaryTelegrafConfig.yml" + old: + $ref: "./TemplateSummaryTelegrafConfig.yml" +required: [kind, stateStatus, id, templateMetaName] diff --git a/api/contract/overrides/schemas/TemplateSummaryDiffVariable.yml b/api/contract/overrides/schemas/TemplateSummaryDiffVariable.yml new file mode 100644 index 0000000..c483b8d --- /dev/null +++ b/api/contract/overrides/schemas/TemplateSummaryDiffVariable.yml @@ -0,0 +1,15 @@ +type: object +properties: + kind: + type: string + stateStatus: + type: string + id: + type: string + templateMetaName: + type: string + new: + $ref: "./TemplateSummaryDiffVariableFields.yml" + old: + $ref: "./TemplateSummaryDiffVariableFields.yml" +required: [kind, stateStatus, id, templateMetaName] diff --git a/api/contract/overrides/schemas/TemplateSummaryDiffVariableFields.yml b/api/contract/overrides/schemas/TemplateSummaryDiffVariableFields.yml new file mode 100644 index 0000000..daa14cf --- /dev/null +++ b/api/contract/overrides/schemas/TemplateSummaryDiffVariableFields.yml @@ -0,0 +1,9 @@ +type: object +properties: + name: + type: string + description: + type: string + args: + $ref: "./TemplateSummaryVariableArgs.yml" +required: [name, args] diff --git a/api/contract/overrides/schemas/TemplateSummaryError.yml b/api/contract/overrides/schemas/TemplateSummaryError.yml new file mode 100644 index 0000000..3898e3e --- /dev/null +++ b/api/contract/overrides/schemas/TemplateSummaryError.yml @@ -0,0 +1,15 @@ +type: object +properties: + kind: + type: string + reason: + type: string + fields: + type: array + items: + type: string + indexes: + type: array + items: + type: integer +required: [kind, reason, fields, indexes] diff --git a/api/contract/overrides/schemas/TemplateSummaryLabel.yml b/api/contract/overrides/schemas/TemplateSummaryLabel.yml new file mode 100644 index 0000000..09a157f --- /dev/null +++ b/api/contract/overrides/schemas/TemplateSummaryLabel.yml @@ -0,0 +1,19 @@ +allOf: + - $ref: "./TemplateSummaryCore.yml" + - type: object + properties: + id: + type: string + orgID: + type: string + name: + type: string + properties: + type: object + properties: + color: + type: string + description: + type: string + required: [color] + required: [id, name, properties] diff --git a/api/contract/overrides/schemas/TemplateSummaryLabelMapping.yml b/api/contract/overrides/schemas/TemplateSummaryLabelMapping.yml new file mode 100644 index 0000000..216be8d --- /dev/null +++ b/api/contract/overrides/schemas/TemplateSummaryLabelMapping.yml @@ -0,0 +1,27 @@ +type: object +properties: + status: + type: string + resourceTemplateMetaName: + type: string + resourceName: + type: string + resourceID: + type: string + resourceType: + type: string + labelTemplateMetaName: + type: string + labelName: + type: string + labelID: + type: string +required: + - status + - resourceTemplateMetaName + - resourceName + - resourceID + - resourceType + - labelTemplateMetaName + - labelName + - labelID diff --git a/api/contract/overrides/schemas/TemplateSummaryNotificationEndpoint.yml b/api/contract/overrides/schemas/TemplateSummaryNotificationEndpoint.yml new file mode 100644 index 0000000..571b328 --- /dev/null +++ b/api/contract/overrides/schemas/TemplateSummaryNotificationEndpoint.yml @@ -0,0 +1,13 @@ +allOf: + - $ref: "./TemplateSummaryCommon.yml" + - type: object + properties: + id: + type: string + name: + type: string + description: + type: string + status: + type: string + required: [id, name, status] diff --git a/api/contract/overrides/schemas/TemplateSummaryNotificationRule.yml b/api/contract/overrides/schemas/TemplateSummaryNotificationRule.yml new file mode 100644 index 0000000..9e58201 --- /dev/null +++ b/api/contract/overrides/schemas/TemplateSummaryNotificationRule.yml @@ -0,0 +1,19 @@ +allOf: + - $ref: "./TemplateSummaryCommon.yml" + - type: object + properties: + name: + type: string + description: + type: string + endpointTemplateMetaName: + type: string + endpointID: + type: string + endpointType: + type: string + every: + type: string + offset: + type: string + required: [name, endpointTemplateMetaName, endpointID, endpointType, every, offset] diff --git a/api/contract/overrides/schemas/TemplateSummaryResources.yml b/api/contract/overrides/schemas/TemplateSummaryResources.yml new file mode 100644 index 0000000..9cbe92d --- /dev/null +++ b/api/contract/overrides/schemas/TemplateSummaryResources.yml @@ -0,0 +1,63 @@ +type: object +properties: + buckets: + type: array + items: + $ref: "./TemplateSummaryBucket.yml" + checks: + type: array + items: + $ref: "./TemplateSummaryCheck.yml" + dashboards: + type: array + items: + $ref: "./TemplateSummaryDashboard.yml" + labels: + type: array + items: + $ref: "./TemplateSummaryLabel.yml" + labelMappings: + type: array + items: + $ref: "./TemplateSummaryLabelMapping.yml" + missingEnvRefs: + type: array + items: + type: string + missingSecrets: + type: array + items: + type: string + notificationEndpoints: + type: array + items: + $ref: "./TemplateSummaryNotificationEndpoint.yml" + notificationRules: + type: array + items: + $ref: "./TemplateSummaryNotificationRule.yml" + tasks: + type: array + items: + $ref: "./TemplateSummaryTask.yml" + telegrafConfigs: + type: array + items: + $ref: "./TemplateSummaryTelegraf.yml" + variables: + type: array + items: + $ref: "./TemplateSummaryVariable.yml" +required: + - buckets + - checks + - dashboards + - labels + - labelMappings + - missingEnvRefs + - missingSecrets + - notificationEndpoints + - notificationRules + - tasks + - telegrafConfigs + - variables diff --git a/api/contract/overrides/schemas/TemplateSummaryTask.yml b/api/contract/overrides/schemas/TemplateSummaryTask.yml new file mode 100644 index 0000000..7a708ee --- /dev/null +++ b/api/contract/overrides/schemas/TemplateSummaryTask.yml @@ -0,0 +1,17 @@ +allOf: + - $ref: "./TemplateSummaryCommon.yml" + - type: object + properties: + id: + type: string + name: + type: string + description: + type: string + cron: + type: string + every: + type: string + offset: + type: string + required: [id, name] diff --git a/api/contract/overrides/schemas/TemplateSummaryTelegraf.yml b/api/contract/overrides/schemas/TemplateSummaryTelegraf.yml new file mode 100644 index 0000000..804a1ea --- /dev/null +++ b/api/contract/overrides/schemas/TemplateSummaryTelegraf.yml @@ -0,0 +1,7 @@ +allOf: + - $ref: "./TemplateSummaryCommon.yml" + - type: object + properties: + telegrafConfig: + $ref: "./TemplateSummaryTelegrafConfig.yml" + required: [telegrafConfig] diff --git a/api/contract/overrides/schemas/TemplateSummaryTelegrafConfig.yml b/api/contract/overrides/schemas/TemplateSummaryTelegrafConfig.yml new file mode 100644 index 0000000..4d9f082 --- /dev/null +++ b/api/contract/overrides/schemas/TemplateSummaryTelegrafConfig.yml @@ -0,0 +1,9 @@ +type: object +properties: + id: + type: string + name: + type: string + description: + type: string +required: [id, name] diff --git a/api/contract/overrides/schemas/TemplateSummaryVariable.yml b/api/contract/overrides/schemas/TemplateSummaryVariable.yml new file mode 100644 index 0000000..8d10ba1 --- /dev/null +++ b/api/contract/overrides/schemas/TemplateSummaryVariable.yml @@ -0,0 +1,13 @@ +allOf: + - $ref: "./TemplateSummaryCommon.yml" + - type: object + properties: + id: + type: string + name: + type: string + description: + type: string + arguments: + $ref: "./TemplateSummaryVariableArgs.yml" + required: [id, name, arguments] diff --git a/api/contract/overrides/schemas/TemplateSummaryVariableArgs.yml b/api/contract/overrides/schemas/TemplateSummaryVariableArgs.yml new file mode 100644 index 0000000..1ed7eed --- /dev/null +++ b/api/contract/overrides/schemas/TemplateSummaryVariableArgs.yml @@ -0,0 +1,6 @@ +type: object +properties: + type: + type: string +required: [type] +additionalProperties: true diff --git a/api/model_template_apply.gen.go b/api/model_template_apply.gen.go new file mode 100644 index 0000000..071f959 --- /dev/null +++ b/api/model_template_apply.gen.go @@ -0,0 +1,366 @@ +/* + * Subset of Influx API covered by Influx CLI + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package api + +import ( + "encoding/json" +) + +// TemplateApply struct for TemplateApply +type TemplateApply struct { + DryRun bool `json:"dryRun"` + OrgID string `json:"orgID"` + StackID *string `json:"stackID,omitempty"` + Template *TemplateApplyTemplate `json:"template,omitempty"` + Templates []TemplateApplyTemplate `json:"templates"` + EnvRefs *map[string]map[string]interface{} `json:"envRefs,omitempty"` + Secrets *map[string]string `json:"secrets,omitempty"` + Remotes []TemplateApplyRemoteRef `json:"remotes"` + Actions []TemplateApplyAction `json:"actions"` +} + +// NewTemplateApply instantiates a new TemplateApply object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateApply(dryRun bool, orgID string, templates []TemplateApplyTemplate, remotes []TemplateApplyRemoteRef, actions []TemplateApplyAction) *TemplateApply { + this := TemplateApply{} + this.DryRun = dryRun + this.OrgID = orgID + this.Templates = templates + this.Remotes = remotes + this.Actions = actions + return &this +} + +// NewTemplateApplyWithDefaults instantiates a new TemplateApply object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateApplyWithDefaults() *TemplateApply { + this := TemplateApply{} + return &this +} + +// GetDryRun returns the DryRun field value +func (o *TemplateApply) GetDryRun() bool { + if o == nil { + var ret bool + return ret + } + + return o.DryRun +} + +// GetDryRunOk returns a tuple with the DryRun field value +// and a boolean to check if the value has been set. +func (o *TemplateApply) GetDryRunOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.DryRun, true +} + +// SetDryRun sets field value +func (o *TemplateApply) SetDryRun(v bool) { + o.DryRun = v +} + +// GetOrgID returns the OrgID field value +func (o *TemplateApply) GetOrgID() string { + if o == nil { + var ret string + return ret + } + + return o.OrgID +} + +// GetOrgIDOk returns a tuple with the OrgID field value +// and a boolean to check if the value has been set. +func (o *TemplateApply) GetOrgIDOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.OrgID, true +} + +// SetOrgID sets field value +func (o *TemplateApply) SetOrgID(v string) { + o.OrgID = v +} + +// GetStackID returns the StackID field value if set, zero value otherwise. +func (o *TemplateApply) GetStackID() string { + if o == nil || o.StackID == nil { + var ret string + return ret + } + return *o.StackID +} + +// GetStackIDOk returns a tuple with the StackID field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateApply) GetStackIDOk() (*string, bool) { + if o == nil || o.StackID == nil { + return nil, false + } + return o.StackID, true +} + +// HasStackID returns a boolean if a field has been set. +func (o *TemplateApply) HasStackID() bool { + if o != nil && o.StackID != nil { + return true + } + + return false +} + +// SetStackID gets a reference to the given string and assigns it to the StackID field. +func (o *TemplateApply) SetStackID(v string) { + o.StackID = &v +} + +// GetTemplate returns the Template field value if set, zero value otherwise. +func (o *TemplateApply) GetTemplate() TemplateApplyTemplate { + if o == nil || o.Template == nil { + var ret TemplateApplyTemplate + return ret + } + return *o.Template +} + +// GetTemplateOk returns a tuple with the Template field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateApply) GetTemplateOk() (*TemplateApplyTemplate, bool) { + if o == nil || o.Template == nil { + return nil, false + } + return o.Template, true +} + +// HasTemplate returns a boolean if a field has been set. +func (o *TemplateApply) HasTemplate() bool { + if o != nil && o.Template != nil { + return true + } + + return false +} + +// SetTemplate gets a reference to the given TemplateApplyTemplate and assigns it to the Template field. +func (o *TemplateApply) SetTemplate(v TemplateApplyTemplate) { + o.Template = &v +} + +// GetTemplates returns the Templates field value +func (o *TemplateApply) GetTemplates() []TemplateApplyTemplate { + if o == nil { + var ret []TemplateApplyTemplate + return ret + } + + return o.Templates +} + +// GetTemplatesOk returns a tuple with the Templates field value +// and a boolean to check if the value has been set. +func (o *TemplateApply) GetTemplatesOk() (*[]TemplateApplyTemplate, bool) { + if o == nil { + return nil, false + } + return &o.Templates, true +} + +// SetTemplates sets field value +func (o *TemplateApply) SetTemplates(v []TemplateApplyTemplate) { + o.Templates = v +} + +// GetEnvRefs returns the EnvRefs field value if set, zero value otherwise. +func (o *TemplateApply) GetEnvRefs() map[string]map[string]interface{} { + if o == nil || o.EnvRefs == nil { + var ret map[string]map[string]interface{} + return ret + } + return *o.EnvRefs +} + +// GetEnvRefsOk returns a tuple with the EnvRefs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateApply) GetEnvRefsOk() (*map[string]map[string]interface{}, bool) { + if o == nil || o.EnvRefs == nil { + return nil, false + } + return o.EnvRefs, true +} + +// HasEnvRefs returns a boolean if a field has been set. +func (o *TemplateApply) HasEnvRefs() bool { + if o != nil && o.EnvRefs != nil { + return true + } + + return false +} + +// SetEnvRefs gets a reference to the given map[string]map[string]interface{} and assigns it to the EnvRefs field. +func (o *TemplateApply) SetEnvRefs(v map[string]map[string]interface{}) { + o.EnvRefs = &v +} + +// GetSecrets returns the Secrets field value if set, zero value otherwise. +func (o *TemplateApply) GetSecrets() map[string]string { + if o == nil || o.Secrets == nil { + var ret map[string]string + return ret + } + return *o.Secrets +} + +// GetSecretsOk returns a tuple with the Secrets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateApply) GetSecretsOk() (*map[string]string, bool) { + if o == nil || o.Secrets == nil { + return nil, false + } + return o.Secrets, true +} + +// HasSecrets returns a boolean if a field has been set. +func (o *TemplateApply) HasSecrets() bool { + if o != nil && o.Secrets != nil { + return true + } + + return false +} + +// SetSecrets gets a reference to the given map[string]string and assigns it to the Secrets field. +func (o *TemplateApply) SetSecrets(v map[string]string) { + o.Secrets = &v +} + +// GetRemotes returns the Remotes field value +func (o *TemplateApply) GetRemotes() []TemplateApplyRemoteRef { + if o == nil { + var ret []TemplateApplyRemoteRef + return ret + } + + return o.Remotes +} + +// GetRemotesOk returns a tuple with the Remotes field value +// and a boolean to check if the value has been set. +func (o *TemplateApply) GetRemotesOk() (*[]TemplateApplyRemoteRef, bool) { + if o == nil { + return nil, false + } + return &o.Remotes, true +} + +// SetRemotes sets field value +func (o *TemplateApply) SetRemotes(v []TemplateApplyRemoteRef) { + o.Remotes = v +} + +// GetActions returns the Actions field value +func (o *TemplateApply) GetActions() []TemplateApplyAction { + if o == nil { + var ret []TemplateApplyAction + return ret + } + + return o.Actions +} + +// GetActionsOk returns a tuple with the Actions field value +// and a boolean to check if the value has been set. +func (o *TemplateApply) GetActionsOk() (*[]TemplateApplyAction, bool) { + if o == nil { + return nil, false + } + return &o.Actions, true +} + +// SetActions sets field value +func (o *TemplateApply) SetActions(v []TemplateApplyAction) { + o.Actions = v +} + +func (o TemplateApply) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["dryRun"] = o.DryRun + } + if true { + toSerialize["orgID"] = o.OrgID + } + if o.StackID != nil { + toSerialize["stackID"] = o.StackID + } + if o.Template != nil { + toSerialize["template"] = o.Template + } + if true { + toSerialize["templates"] = o.Templates + } + if o.EnvRefs != nil { + toSerialize["envRefs"] = o.EnvRefs + } + if o.Secrets != nil { + toSerialize["secrets"] = o.Secrets + } + if true { + toSerialize["remotes"] = o.Remotes + } + if true { + toSerialize["actions"] = o.Actions + } + return json.Marshal(toSerialize) +} + +type NullableTemplateApply struct { + value *TemplateApply + isSet bool +} + +func (v NullableTemplateApply) Get() *TemplateApply { + return v.value +} + +func (v *NullableTemplateApply) Set(val *TemplateApply) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateApply) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateApply) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateApply(val *TemplateApply) *NullableTemplateApply { + return &NullableTemplateApply{value: val, isSet: true} +} + +func (v NullableTemplateApply) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateApply) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/model_template_apply_action.gen.go b/api/model_template_apply_action.gen.go new file mode 100644 index 0000000..f94200b --- /dev/null +++ b/api/model_template_apply_action.gen.go @@ -0,0 +1,135 @@ +/* + * Subset of Influx API covered by Influx CLI + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package api + +import ( + "encoding/json" +) + +// TemplateApplyAction struct for TemplateApplyAction +type TemplateApplyAction struct { + Action TemplateApplyActionKind `json:"action"` + Properties TemplateApplyActionProperties `json:"properties"` +} + +// NewTemplateApplyAction instantiates a new TemplateApplyAction object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateApplyAction(action TemplateApplyActionKind, properties TemplateApplyActionProperties) *TemplateApplyAction { + this := TemplateApplyAction{} + this.Action = action + this.Properties = properties + return &this +} + +// NewTemplateApplyActionWithDefaults instantiates a new TemplateApplyAction object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateApplyActionWithDefaults() *TemplateApplyAction { + this := TemplateApplyAction{} + return &this +} + +// GetAction returns the Action field value +func (o *TemplateApplyAction) GetAction() TemplateApplyActionKind { + if o == nil { + var ret TemplateApplyActionKind + return ret + } + + return o.Action +} + +// GetActionOk returns a tuple with the Action field value +// and a boolean to check if the value has been set. +func (o *TemplateApplyAction) GetActionOk() (*TemplateApplyActionKind, bool) { + if o == nil { + return nil, false + } + return &o.Action, true +} + +// SetAction sets field value +func (o *TemplateApplyAction) SetAction(v TemplateApplyActionKind) { + o.Action = v +} + +// GetProperties returns the Properties field value +func (o *TemplateApplyAction) GetProperties() TemplateApplyActionProperties { + if o == nil { + var ret TemplateApplyActionProperties + return ret + } + + return o.Properties +} + +// GetPropertiesOk returns a tuple with the Properties field value +// and a boolean to check if the value has been set. +func (o *TemplateApplyAction) GetPropertiesOk() (*TemplateApplyActionProperties, bool) { + if o == nil { + return nil, false + } + return &o.Properties, true +} + +// SetProperties sets field value +func (o *TemplateApplyAction) SetProperties(v TemplateApplyActionProperties) { + o.Properties = v +} + +func (o TemplateApplyAction) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["action"] = o.Action + } + if true { + toSerialize["properties"] = o.Properties + } + return json.Marshal(toSerialize) +} + +type NullableTemplateApplyAction struct { + value *TemplateApplyAction + isSet bool +} + +func (v NullableTemplateApplyAction) Get() *TemplateApplyAction { + return v.value +} + +func (v *NullableTemplateApplyAction) Set(val *TemplateApplyAction) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateApplyAction) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateApplyAction) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateApplyAction(val *TemplateApplyAction) *NullableTemplateApplyAction { + return &NullableTemplateApplyAction{value: val, isSet: true} +} + +func (v NullableTemplateApplyAction) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateApplyAction) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/model_template_apply_action_kind.gen.go b/api/model_template_apply_action_kind.gen.go new file mode 100644 index 0000000..679c03c --- /dev/null +++ b/api/model_template_apply_action_kind.gen.go @@ -0,0 +1,83 @@ +/* + * Subset of Influx API covered by Influx CLI + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package api + +import ( + "encoding/json" + "fmt" +) + +// TemplateApplyActionKind the model 'TemplateApplyActionKind' +type TemplateApplyActionKind string + +// List of TemplateApplyActionKind +const ( + TEMPLATEAPPLYACTIONKIND_SKIP_KIND TemplateApplyActionKind = "skipKind" + TEMPLATEAPPLYACTIONKIND_SKIP_RESOURCE TemplateApplyActionKind = "skipResource" +) + +func (v *TemplateApplyActionKind) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := TemplateApplyActionKind(value) + for _, existing := range []TemplateApplyActionKind{"skipKind", "skipResource"} { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid TemplateApplyActionKind", value) +} + +// Ptr returns reference to TemplateApplyActionKind value +func (v TemplateApplyActionKind) Ptr() *TemplateApplyActionKind { + return &v +} + +type NullableTemplateApplyActionKind struct { + value *TemplateApplyActionKind + isSet bool +} + +func (v NullableTemplateApplyActionKind) Get() *TemplateApplyActionKind { + return v.value +} + +func (v *NullableTemplateApplyActionKind) Set(val *TemplateApplyActionKind) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateApplyActionKind) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateApplyActionKind) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateApplyActionKind(val *TemplateApplyActionKind) *NullableTemplateApplyActionKind { + return &NullableTemplateApplyActionKind{value: val, isSet: true} +} + +func (v NullableTemplateApplyActionKind) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateApplyActionKind) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/model_template_apply_action_properties.gen.go b/api/model_template_apply_action_properties.gen.go new file mode 100644 index 0000000..64aeae4 --- /dev/null +++ b/api/model_template_apply_action_properties.gen.go @@ -0,0 +1,142 @@ +/* + * Subset of Influx API covered by Influx CLI + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package api + +import ( + "encoding/json" +) + +// TemplateApplyActionProperties struct for TemplateApplyActionProperties +type TemplateApplyActionProperties struct { + Kind string `json:"kind"` + ResourceTemplateName *string `json:"resourceTemplateName,omitempty"` +} + +// NewTemplateApplyActionProperties instantiates a new TemplateApplyActionProperties object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateApplyActionProperties(kind string) *TemplateApplyActionProperties { + this := TemplateApplyActionProperties{} + this.Kind = kind + return &this +} + +// NewTemplateApplyActionPropertiesWithDefaults instantiates a new TemplateApplyActionProperties object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateApplyActionPropertiesWithDefaults() *TemplateApplyActionProperties { + this := TemplateApplyActionProperties{} + return &this +} + +// GetKind returns the Kind field value +func (o *TemplateApplyActionProperties) GetKind() string { + if o == nil { + var ret string + return ret + } + + return o.Kind +} + +// GetKindOk returns a tuple with the Kind field value +// and a boolean to check if the value has been set. +func (o *TemplateApplyActionProperties) GetKindOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Kind, true +} + +// SetKind sets field value +func (o *TemplateApplyActionProperties) SetKind(v string) { + o.Kind = v +} + +// GetResourceTemplateName returns the ResourceTemplateName field value if set, zero value otherwise. +func (o *TemplateApplyActionProperties) GetResourceTemplateName() string { + if o == nil || o.ResourceTemplateName == nil { + var ret string + return ret + } + return *o.ResourceTemplateName +} + +// GetResourceTemplateNameOk returns a tuple with the ResourceTemplateName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateApplyActionProperties) GetResourceTemplateNameOk() (*string, bool) { + if o == nil || o.ResourceTemplateName == nil { + return nil, false + } + return o.ResourceTemplateName, true +} + +// HasResourceTemplateName returns a boolean if a field has been set. +func (o *TemplateApplyActionProperties) HasResourceTemplateName() bool { + if o != nil && o.ResourceTemplateName != nil { + return true + } + + return false +} + +// SetResourceTemplateName gets a reference to the given string and assigns it to the ResourceTemplateName field. +func (o *TemplateApplyActionProperties) SetResourceTemplateName(v string) { + o.ResourceTemplateName = &v +} + +func (o TemplateApplyActionProperties) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["kind"] = o.Kind + } + if o.ResourceTemplateName != nil { + toSerialize["resourceTemplateName"] = o.ResourceTemplateName + } + return json.Marshal(toSerialize) +} + +type NullableTemplateApplyActionProperties struct { + value *TemplateApplyActionProperties + isSet bool +} + +func (v NullableTemplateApplyActionProperties) Get() *TemplateApplyActionProperties { + return v.value +} + +func (v *NullableTemplateApplyActionProperties) Set(val *TemplateApplyActionProperties) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateApplyActionProperties) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateApplyActionProperties) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateApplyActionProperties(val *TemplateApplyActionProperties) *NullableTemplateApplyActionProperties { + return &NullableTemplateApplyActionProperties{value: val, isSet: true} +} + +func (v NullableTemplateApplyActionProperties) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateApplyActionProperties) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/model_template_apply_remote_ref.gen.go b/api/model_template_apply_remote_ref.gen.go new file mode 100644 index 0000000..aa1157c --- /dev/null +++ b/api/model_template_apply_remote_ref.gen.go @@ -0,0 +1,142 @@ +/* + * Subset of Influx API covered by Influx CLI + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package api + +import ( + "encoding/json" +) + +// TemplateApplyRemoteRef struct for TemplateApplyRemoteRef +type TemplateApplyRemoteRef struct { + Url string `json:"url"` + ContentType *string `json:"contentType,omitempty"` +} + +// NewTemplateApplyRemoteRef instantiates a new TemplateApplyRemoteRef object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateApplyRemoteRef(url string) *TemplateApplyRemoteRef { + this := TemplateApplyRemoteRef{} + this.Url = url + return &this +} + +// NewTemplateApplyRemoteRefWithDefaults instantiates a new TemplateApplyRemoteRef object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateApplyRemoteRefWithDefaults() *TemplateApplyRemoteRef { + this := TemplateApplyRemoteRef{} + return &this +} + +// GetUrl returns the Url field value +func (o *TemplateApplyRemoteRef) GetUrl() string { + if o == nil { + var ret string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *TemplateApplyRemoteRef) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Url, true +} + +// SetUrl sets field value +func (o *TemplateApplyRemoteRef) SetUrl(v string) { + o.Url = v +} + +// GetContentType returns the ContentType field value if set, zero value otherwise. +func (o *TemplateApplyRemoteRef) GetContentType() string { + if o == nil || o.ContentType == nil { + var ret string + return ret + } + return *o.ContentType +} + +// GetContentTypeOk returns a tuple with the ContentType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateApplyRemoteRef) GetContentTypeOk() (*string, bool) { + if o == nil || o.ContentType == nil { + return nil, false + } + return o.ContentType, true +} + +// HasContentType returns a boolean if a field has been set. +func (o *TemplateApplyRemoteRef) HasContentType() bool { + if o != nil && o.ContentType != nil { + return true + } + + return false +} + +// SetContentType gets a reference to the given string and assigns it to the ContentType field. +func (o *TemplateApplyRemoteRef) SetContentType(v string) { + o.ContentType = &v +} + +func (o TemplateApplyRemoteRef) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["url"] = o.Url + } + if o.ContentType != nil { + toSerialize["contentType"] = o.ContentType + } + return json.Marshal(toSerialize) +} + +type NullableTemplateApplyRemoteRef struct { + value *TemplateApplyRemoteRef + isSet bool +} + +func (v NullableTemplateApplyRemoteRef) Get() *TemplateApplyRemoteRef { + return v.value +} + +func (v *NullableTemplateApplyRemoteRef) Set(val *TemplateApplyRemoteRef) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateApplyRemoteRef) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateApplyRemoteRef) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateApplyRemoteRef(val *TemplateApplyRemoteRef) *NullableTemplateApplyRemoteRef { + return &NullableTemplateApplyRemoteRef{value: val, isSet: true} +} + +func (v NullableTemplateApplyRemoteRef) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateApplyRemoteRef) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/model_template_apply_template.gen.go b/api/model_template_apply_template.gen.go new file mode 100644 index 0000000..807f721 --- /dev/null +++ b/api/model_template_apply_template.gen.go @@ -0,0 +1,135 @@ +/* + * Subset of Influx API covered by Influx CLI + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package api + +import ( + "encoding/json" +) + +// TemplateApplyTemplate struct for TemplateApplyTemplate +type TemplateApplyTemplate struct { + Sources []string `json:"sources"` + Contents []TemplateEntry `json:"contents"` +} + +// NewTemplateApplyTemplate instantiates a new TemplateApplyTemplate object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateApplyTemplate(sources []string, contents []TemplateEntry) *TemplateApplyTemplate { + this := TemplateApplyTemplate{} + this.Sources = sources + this.Contents = contents + return &this +} + +// NewTemplateApplyTemplateWithDefaults instantiates a new TemplateApplyTemplate object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateApplyTemplateWithDefaults() *TemplateApplyTemplate { + this := TemplateApplyTemplate{} + return &this +} + +// GetSources returns the Sources field value +func (o *TemplateApplyTemplate) GetSources() []string { + if o == nil { + var ret []string + return ret + } + + return o.Sources +} + +// GetSourcesOk returns a tuple with the Sources field value +// and a boolean to check if the value has been set. +func (o *TemplateApplyTemplate) GetSourcesOk() (*[]string, bool) { + if o == nil { + return nil, false + } + return &o.Sources, true +} + +// SetSources sets field value +func (o *TemplateApplyTemplate) SetSources(v []string) { + o.Sources = v +} + +// GetContents returns the Contents field value +func (o *TemplateApplyTemplate) GetContents() []TemplateEntry { + if o == nil { + var ret []TemplateEntry + return ret + } + + return o.Contents +} + +// GetContentsOk returns a tuple with the Contents field value +// and a boolean to check if the value has been set. +func (o *TemplateApplyTemplate) GetContentsOk() (*[]TemplateEntry, bool) { + if o == nil { + return nil, false + } + return &o.Contents, true +} + +// SetContents sets field value +func (o *TemplateApplyTemplate) SetContents(v []TemplateEntry) { + o.Contents = v +} + +func (o TemplateApplyTemplate) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["sources"] = o.Sources + } + if true { + toSerialize["contents"] = o.Contents + } + return json.Marshal(toSerialize) +} + +type NullableTemplateApplyTemplate struct { + value *TemplateApplyTemplate + isSet bool +} + +func (v NullableTemplateApplyTemplate) Get() *TemplateApplyTemplate { + return v.value +} + +func (v *NullableTemplateApplyTemplate) Set(val *TemplateApplyTemplate) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateApplyTemplate) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateApplyTemplate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateApplyTemplate(val *TemplateApplyTemplate) *NullableTemplateApplyTemplate { + return &NullableTemplateApplyTemplate{value: val, isSet: true} +} + +func (v NullableTemplateApplyTemplate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateApplyTemplate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/model_template_entry.gen.go b/api/model_template_entry.gen.go index 60e1045..e195df0 100644 --- a/api/model_template_entry.gen.go +++ b/api/model_template_entry.gen.go @@ -16,18 +16,22 @@ import ( // TemplateEntry struct for TemplateEntry type TemplateEntry struct { - ApiVersion *string `json:"apiVersion,omitempty"` - Kind *string `json:"kind,omitempty"` - Meta *TemplateEntryMeta `json:"meta,omitempty"` - Spec *map[string]interface{} `json:"spec,omitempty"` + ApiVersion string `json:"apiVersion"` + Kind string `json:"kind"` + Meta TemplateEntryMeta `json:"meta"` + Spec map[string]interface{} `json:"spec"` } // NewTemplateEntry instantiates a new TemplateEntry object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewTemplateEntry() *TemplateEntry { +func NewTemplateEntry(apiVersion string, kind string, meta TemplateEntryMeta, spec map[string]interface{}) *TemplateEntry { this := TemplateEntry{} + this.ApiVersion = apiVersion + this.Kind = kind + this.Meta = meta + this.Spec = spec return &this } @@ -39,146 +43,114 @@ func NewTemplateEntryWithDefaults() *TemplateEntry { return &this } -// GetApiVersion returns the ApiVersion field value if set, zero value otherwise. +// GetApiVersion returns the ApiVersion field value func (o *TemplateEntry) GetApiVersion() string { - if o == nil || o.ApiVersion == nil { + if o == nil { var ret string return ret } - return *o.ApiVersion + + return o.ApiVersion } -// GetApiVersionOk returns a tuple with the ApiVersion field value if set, nil otherwise +// GetApiVersionOk returns a tuple with the ApiVersion field value // and a boolean to check if the value has been set. func (o *TemplateEntry) GetApiVersionOk() (*string, bool) { - if o == nil || o.ApiVersion == nil { + if o == nil { return nil, false } - return o.ApiVersion, true + return &o.ApiVersion, true } -// HasApiVersion returns a boolean if a field has been set. -func (o *TemplateEntry) HasApiVersion() bool { - if o != nil && o.ApiVersion != nil { - return true - } - - return false -} - -// SetApiVersion gets a reference to the given string and assigns it to the ApiVersion field. +// SetApiVersion sets field value func (o *TemplateEntry) SetApiVersion(v string) { - o.ApiVersion = &v + o.ApiVersion = v } -// GetKind returns the Kind field value if set, zero value otherwise. +// GetKind returns the Kind field value func (o *TemplateEntry) GetKind() string { - if o == nil || o.Kind == nil { + if o == nil { var ret string return ret } - return *o.Kind + + return o.Kind } -// GetKindOk returns a tuple with the Kind field value if set, nil otherwise +// GetKindOk returns a tuple with the Kind field value // and a boolean to check if the value has been set. func (o *TemplateEntry) GetKindOk() (*string, bool) { - if o == nil || o.Kind == nil { + if o == nil { return nil, false } - return o.Kind, true + return &o.Kind, true } -// HasKind returns a boolean if a field has been set. -func (o *TemplateEntry) HasKind() bool { - if o != nil && o.Kind != nil { - return true - } - - return false -} - -// SetKind gets a reference to the given string and assigns it to the Kind field. +// SetKind sets field value func (o *TemplateEntry) SetKind(v string) { - o.Kind = &v + o.Kind = v } -// GetMeta returns the Meta field value if set, zero value otherwise. +// GetMeta returns the Meta field value func (o *TemplateEntry) GetMeta() TemplateEntryMeta { - if o == nil || o.Meta == nil { + if o == nil { var ret TemplateEntryMeta return ret } - return *o.Meta + + return o.Meta } -// GetMetaOk returns a tuple with the Meta field value if set, nil otherwise +// GetMetaOk returns a tuple with the Meta field value // and a boolean to check if the value has been set. func (o *TemplateEntry) GetMetaOk() (*TemplateEntryMeta, bool) { - if o == nil || o.Meta == nil { + if o == nil { return nil, false } - return o.Meta, true + return &o.Meta, true } -// HasMeta returns a boolean if a field has been set. -func (o *TemplateEntry) HasMeta() bool { - if o != nil && o.Meta != nil { - return true - } - - return false -} - -// SetMeta gets a reference to the given TemplateEntryMeta and assigns it to the Meta field. +// SetMeta sets field value func (o *TemplateEntry) SetMeta(v TemplateEntryMeta) { - o.Meta = &v + o.Meta = v } -// GetSpec returns the Spec field value if set, zero value otherwise. +// GetSpec returns the Spec field value func (o *TemplateEntry) GetSpec() map[string]interface{} { - if o == nil || o.Spec == nil { + if o == nil { var ret map[string]interface{} return ret } - return *o.Spec + + return o.Spec } -// GetSpecOk returns a tuple with the Spec field value if set, nil otherwise +// GetSpecOk returns a tuple with the Spec field value // and a boolean to check if the value has been set. func (o *TemplateEntry) GetSpecOk() (*map[string]interface{}, bool) { - if o == nil || o.Spec == nil { + if o == nil { return nil, false } - return o.Spec, true + return &o.Spec, true } -// HasSpec returns a boolean if a field has been set. -func (o *TemplateEntry) HasSpec() bool { - if o != nil && o.Spec != nil { - return true - } - - return false -} - -// SetSpec gets a reference to the given map[string]interface{} and assigns it to the Spec field. +// SetSpec sets field value func (o *TemplateEntry) SetSpec(v map[string]interface{}) { - o.Spec = &v + o.Spec = v } func (o TemplateEntry) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.ApiVersion != nil { + if true { toSerialize["apiVersion"] = o.ApiVersion } - if o.Kind != nil { + if true { toSerialize["kind"] = o.Kind } - if o.Meta != nil { + if true { toSerialize["meta"] = o.Meta } - if o.Spec != nil { + if true { toSerialize["spec"] = o.Spec } return json.Marshal(toSerialize) diff --git a/api/model_template_entry_meta.gen.go b/api/model_template_entry_meta.gen.go index b679fff..5a3a32e 100644 --- a/api/model_template_entry_meta.gen.go +++ b/api/model_template_entry_meta.gen.go @@ -16,15 +16,16 @@ import ( // TemplateEntryMeta struct for TemplateEntryMeta type TemplateEntryMeta struct { - Name *string `json:"name,omitempty"` + Name string `json:"name"` } // NewTemplateEntryMeta instantiates a new TemplateEntryMeta object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewTemplateEntryMeta() *TemplateEntryMeta { +func NewTemplateEntryMeta(name string) *TemplateEntryMeta { this := TemplateEntryMeta{} + this.Name = name return &this } @@ -36,41 +37,33 @@ func NewTemplateEntryMetaWithDefaults() *TemplateEntryMeta { return &this } -// GetName returns the Name field value if set, zero value otherwise. +// GetName returns the Name field value func (o *TemplateEntryMeta) GetName() string { - if o == nil || o.Name == nil { + if o == nil { var ret string return ret } - return *o.Name + + return o.Name } -// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. func (o *TemplateEntryMeta) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil { return nil, false } - return o.Name, true + return &o.Name, true } -// HasName returns a boolean if a field has been set. -func (o *TemplateEntryMeta) HasName() bool { - if o != nil && o.Name != nil { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. +// SetName sets field value func (o *TemplateEntryMeta) SetName(v string) { - o.Name = &v + o.Name = v } func (o TemplateEntryMeta) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if true { toSerialize["name"] = o.Name } return json.Marshal(toSerialize) diff --git a/api/model_template_env_reference.gen.go b/api/model_template_env_reference.gen.go new file mode 100644 index 0000000..c3beb98 --- /dev/null +++ b/api/model_template_env_reference.gen.go @@ -0,0 +1,213 @@ +/* + * Subset of Influx API covered by Influx CLI + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package api + +import ( + "encoding/json" +) + +// TemplateEnvReference struct for TemplateEnvReference +type TemplateEnvReference struct { + // Field the environment reference corresponds too + ResourceField string `json:"resourceField"` + // Key identified as environment reference and is the key identified in the template + EnvRefKey string `json:"envRefKey"` + // Value provided to fulfill reference + Value interface{} `json:"value,omitempty"` + // Default value that will be provided for the reference when no value is provided + DefaultValue interface{} `json:"defaultValue,omitempty"` +} + +// NewTemplateEnvReference instantiates a new TemplateEnvReference object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateEnvReference(resourceField string, envRefKey string) *TemplateEnvReference { + this := TemplateEnvReference{} + this.ResourceField = resourceField + this.EnvRefKey = envRefKey + return &this +} + +// NewTemplateEnvReferenceWithDefaults instantiates a new TemplateEnvReference object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateEnvReferenceWithDefaults() *TemplateEnvReference { + this := TemplateEnvReference{} + return &this +} + +// GetResourceField returns the ResourceField field value +func (o *TemplateEnvReference) GetResourceField() string { + if o == nil { + var ret string + return ret + } + + return o.ResourceField +} + +// GetResourceFieldOk returns a tuple with the ResourceField field value +// and a boolean to check if the value has been set. +func (o *TemplateEnvReference) GetResourceFieldOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ResourceField, true +} + +// SetResourceField sets field value +func (o *TemplateEnvReference) SetResourceField(v string) { + o.ResourceField = v +} + +// GetEnvRefKey returns the EnvRefKey field value +func (o *TemplateEnvReference) GetEnvRefKey() string { + if o == nil { + var ret string + return ret + } + + return o.EnvRefKey +} + +// GetEnvRefKeyOk returns a tuple with the EnvRefKey field value +// and a boolean to check if the value has been set. +func (o *TemplateEnvReference) GetEnvRefKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.EnvRefKey, true +} + +// SetEnvRefKey sets field value +func (o *TemplateEnvReference) SetEnvRefKey(v string) { + o.EnvRefKey = v +} + +// GetValue returns the Value field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TemplateEnvReference) GetValue() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TemplateEnvReference) GetValueOk() (*interface{}, bool) { + if o == nil || o.Value == nil { + return nil, false + } + return &o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *TemplateEnvReference) HasValue() bool { + if o != nil && o.Value != nil { + return true + } + + return false +} + +// SetValue gets a reference to the given interface{} and assigns it to the Value field. +func (o *TemplateEnvReference) SetValue(v interface{}) { + o.Value = v +} + +// GetDefaultValue returns the DefaultValue field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TemplateEnvReference) GetDefaultValue() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.DefaultValue +} + +// GetDefaultValueOk returns a tuple with the DefaultValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TemplateEnvReference) GetDefaultValueOk() (*interface{}, bool) { + if o == nil || o.DefaultValue == nil { + return nil, false + } + return &o.DefaultValue, true +} + +// HasDefaultValue returns a boolean if a field has been set. +func (o *TemplateEnvReference) HasDefaultValue() bool { + if o != nil && o.DefaultValue != nil { + return true + } + + return false +} + +// SetDefaultValue gets a reference to the given interface{} and assigns it to the DefaultValue field. +func (o *TemplateEnvReference) SetDefaultValue(v interface{}) { + o.DefaultValue = v +} + +func (o TemplateEnvReference) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["resourceField"] = o.ResourceField + } + if true { + toSerialize["envRefKey"] = o.EnvRefKey + } + if o.Value != nil { + toSerialize["value"] = o.Value + } + if o.DefaultValue != nil { + toSerialize["defaultValue"] = o.DefaultValue + } + return json.Marshal(toSerialize) +} + +type NullableTemplateEnvReference struct { + value *TemplateEnvReference + isSet bool +} + +func (v NullableTemplateEnvReference) Get() *TemplateEnvReference { + return v.value +} + +func (v *NullableTemplateEnvReference) Set(val *TemplateEnvReference) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateEnvReference) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateEnvReference) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateEnvReference(val *TemplateEnvReference) *NullableTemplateEnvReference { + return &NullableTemplateEnvReference{value: val, isSet: true} +} + +func (v NullableTemplateEnvReference) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateEnvReference) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/model_template_summary.gen.go b/api/model_template_summary.gen.go new file mode 100644 index 0000000..e8422c7 --- /dev/null +++ b/api/model_template_summary.gen.go @@ -0,0 +1,222 @@ +/* + * Subset of Influx API covered by Influx CLI + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package api + +import ( + "encoding/json" +) + +// TemplateSummary struct for TemplateSummary +type TemplateSummary struct { + Sources []string `json:"sources"` + StackID string `json:"stackID"` + Summary TemplateSummaryResources `json:"summary"` + Diff TemplateSummaryDiff `json:"diff"` + Errors []TemplateSummaryError `json:"errors"` +} + +// NewTemplateSummary instantiates a new TemplateSummary object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateSummary(sources []string, stackID string, summary TemplateSummaryResources, diff TemplateSummaryDiff, errors []TemplateSummaryError) *TemplateSummary { + this := TemplateSummary{} + this.Sources = sources + this.StackID = stackID + this.Summary = summary + this.Diff = diff + this.Errors = errors + return &this +} + +// NewTemplateSummaryWithDefaults instantiates a new TemplateSummary object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateSummaryWithDefaults() *TemplateSummary { + this := TemplateSummary{} + return &this +} + +// GetSources returns the Sources field value +func (o *TemplateSummary) GetSources() []string { + if o == nil { + var ret []string + return ret + } + + return o.Sources +} + +// GetSourcesOk returns a tuple with the Sources field value +// and a boolean to check if the value has been set. +func (o *TemplateSummary) GetSourcesOk() (*[]string, bool) { + if o == nil { + return nil, false + } + return &o.Sources, true +} + +// SetSources sets field value +func (o *TemplateSummary) SetSources(v []string) { + o.Sources = v +} + +// GetStackID returns the StackID field value +func (o *TemplateSummary) GetStackID() string { + if o == nil { + var ret string + return ret + } + + return o.StackID +} + +// GetStackIDOk returns a tuple with the StackID field value +// and a boolean to check if the value has been set. +func (o *TemplateSummary) GetStackIDOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.StackID, true +} + +// SetStackID sets field value +func (o *TemplateSummary) SetStackID(v string) { + o.StackID = v +} + +// GetSummary returns the Summary field value +func (o *TemplateSummary) GetSummary() TemplateSummaryResources { + if o == nil { + var ret TemplateSummaryResources + return ret + } + + return o.Summary +} + +// GetSummaryOk returns a tuple with the Summary field value +// and a boolean to check if the value has been set. +func (o *TemplateSummary) GetSummaryOk() (*TemplateSummaryResources, bool) { + if o == nil { + return nil, false + } + return &o.Summary, true +} + +// SetSummary sets field value +func (o *TemplateSummary) SetSummary(v TemplateSummaryResources) { + o.Summary = v +} + +// GetDiff returns the Diff field value +func (o *TemplateSummary) GetDiff() TemplateSummaryDiff { + if o == nil { + var ret TemplateSummaryDiff + return ret + } + + return o.Diff +} + +// GetDiffOk returns a tuple with the Diff field value +// and a boolean to check if the value has been set. +func (o *TemplateSummary) GetDiffOk() (*TemplateSummaryDiff, bool) { + if o == nil { + return nil, false + } + return &o.Diff, true +} + +// SetDiff sets field value +func (o *TemplateSummary) SetDiff(v TemplateSummaryDiff) { + o.Diff = v +} + +// GetErrors returns the Errors field value +func (o *TemplateSummary) GetErrors() []TemplateSummaryError { + if o == nil { + var ret []TemplateSummaryError + return ret + } + + return o.Errors +} + +// GetErrorsOk returns a tuple with the Errors field value +// and a boolean to check if the value has been set. +func (o *TemplateSummary) GetErrorsOk() (*[]TemplateSummaryError, bool) { + if o == nil { + return nil, false + } + return &o.Errors, true +} + +// SetErrors sets field value +func (o *TemplateSummary) SetErrors(v []TemplateSummaryError) { + o.Errors = v +} + +func (o TemplateSummary) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["sources"] = o.Sources + } + if true { + toSerialize["stackID"] = o.StackID + } + if true { + toSerialize["summary"] = o.Summary + } + if true { + toSerialize["diff"] = o.Diff + } + if true { + toSerialize["errors"] = o.Errors + } + return json.Marshal(toSerialize) +} + +type NullableTemplateSummary struct { + value *TemplateSummary + isSet bool +} + +func (v NullableTemplateSummary) Get() *TemplateSummary { + return v.value +} + +func (v *NullableTemplateSummary) Set(val *TemplateSummary) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateSummary) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateSummary) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateSummary(val *TemplateSummary) *NullableTemplateSummary { + return &NullableTemplateSummary{value: val, isSet: true} +} + +func (v NullableTemplateSummary) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateSummary) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/model_template_summary_bucket.gen.go b/api/model_template_summary_bucket.gen.go new file mode 100644 index 0000000..77f370d --- /dev/null +++ b/api/model_template_summary_bucket.gen.go @@ -0,0 +1,359 @@ +/* + * Subset of Influx API covered by Influx CLI + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package api + +import ( + "encoding/json" +) + +// TemplateSummaryBucket struct for TemplateSummaryBucket +type TemplateSummaryBucket struct { + Kind string `json:"kind"` + TemplateMetaName *string `json:"templateMetaName,omitempty"` + EnvReferences []TemplateEnvReference `json:"envReferences"` + LabelAssociations []TemplateSummaryLabel `json:"labelAssociations"` + Id string `json:"id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + RetentionPeriod int32 `json:"retentionPeriod"` + SchemaType *string `json:"schemaType,omitempty"` +} + +// NewTemplateSummaryBucket instantiates a new TemplateSummaryBucket object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateSummaryBucket(kind string, envReferences []TemplateEnvReference, labelAssociations []TemplateSummaryLabel, id string, name string, retentionPeriod int32) *TemplateSummaryBucket { + this := TemplateSummaryBucket{} + this.Kind = kind + this.EnvReferences = envReferences + this.LabelAssociations = labelAssociations + this.Id = id + this.Name = name + this.RetentionPeriod = retentionPeriod + return &this +} + +// NewTemplateSummaryBucketWithDefaults instantiates a new TemplateSummaryBucket object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateSummaryBucketWithDefaults() *TemplateSummaryBucket { + this := TemplateSummaryBucket{} + return &this +} + +// GetKind returns the Kind field value +func (o *TemplateSummaryBucket) GetKind() string { + if o == nil { + var ret string + return ret + } + + return o.Kind +} + +// GetKindOk returns a tuple with the Kind field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryBucket) GetKindOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Kind, true +} + +// SetKind sets field value +func (o *TemplateSummaryBucket) SetKind(v string) { + o.Kind = v +} + +// GetTemplateMetaName returns the TemplateMetaName field value if set, zero value otherwise. +func (o *TemplateSummaryBucket) GetTemplateMetaName() string { + if o == nil || o.TemplateMetaName == nil { + var ret string + return ret + } + return *o.TemplateMetaName +} + +// GetTemplateMetaNameOk returns a tuple with the TemplateMetaName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryBucket) GetTemplateMetaNameOk() (*string, bool) { + if o == nil || o.TemplateMetaName == nil { + return nil, false + } + return o.TemplateMetaName, true +} + +// HasTemplateMetaName returns a boolean if a field has been set. +func (o *TemplateSummaryBucket) HasTemplateMetaName() bool { + if o != nil && o.TemplateMetaName != nil { + return true + } + + return false +} + +// SetTemplateMetaName gets a reference to the given string and assigns it to the TemplateMetaName field. +func (o *TemplateSummaryBucket) SetTemplateMetaName(v string) { + o.TemplateMetaName = &v +} + +// GetEnvReferences returns the EnvReferences field value +func (o *TemplateSummaryBucket) GetEnvReferences() []TemplateEnvReference { + if o == nil { + var ret []TemplateEnvReference + return ret + } + + return o.EnvReferences +} + +// GetEnvReferencesOk returns a tuple with the EnvReferences field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryBucket) GetEnvReferencesOk() (*[]TemplateEnvReference, bool) { + if o == nil { + return nil, false + } + return &o.EnvReferences, true +} + +// SetEnvReferences sets field value +func (o *TemplateSummaryBucket) SetEnvReferences(v []TemplateEnvReference) { + o.EnvReferences = v +} + +// GetLabelAssociations returns the LabelAssociations field value +func (o *TemplateSummaryBucket) GetLabelAssociations() []TemplateSummaryLabel { + if o == nil { + var ret []TemplateSummaryLabel + return ret + } + + return o.LabelAssociations +} + +// GetLabelAssociationsOk returns a tuple with the LabelAssociations field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryBucket) GetLabelAssociationsOk() (*[]TemplateSummaryLabel, bool) { + if o == nil { + return nil, false + } + return &o.LabelAssociations, true +} + +// SetLabelAssociations sets field value +func (o *TemplateSummaryBucket) SetLabelAssociations(v []TemplateSummaryLabel) { + o.LabelAssociations = v +} + +// GetId returns the Id field value +func (o *TemplateSummaryBucket) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryBucket) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *TemplateSummaryBucket) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *TemplateSummaryBucket) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryBucket) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *TemplateSummaryBucket) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *TemplateSummaryBucket) GetDescription() string { + if o == nil || o.Description == nil { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryBucket) GetDescriptionOk() (*string, bool) { + if o == nil || o.Description == nil { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *TemplateSummaryBucket) HasDescription() bool { + if o != nil && o.Description != nil { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *TemplateSummaryBucket) SetDescription(v string) { + o.Description = &v +} + +// GetRetentionPeriod returns the RetentionPeriod field value +func (o *TemplateSummaryBucket) GetRetentionPeriod() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.RetentionPeriod +} + +// GetRetentionPeriodOk returns a tuple with the RetentionPeriod field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryBucket) GetRetentionPeriodOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.RetentionPeriod, true +} + +// SetRetentionPeriod sets field value +func (o *TemplateSummaryBucket) SetRetentionPeriod(v int32) { + o.RetentionPeriod = v +} + +// GetSchemaType returns the SchemaType field value if set, zero value otherwise. +func (o *TemplateSummaryBucket) GetSchemaType() string { + if o == nil || o.SchemaType == nil { + var ret string + return ret + } + return *o.SchemaType +} + +// GetSchemaTypeOk returns a tuple with the SchemaType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryBucket) GetSchemaTypeOk() (*string, bool) { + if o == nil || o.SchemaType == nil { + return nil, false + } + return o.SchemaType, true +} + +// HasSchemaType returns a boolean if a field has been set. +func (o *TemplateSummaryBucket) HasSchemaType() bool { + if o != nil && o.SchemaType != nil { + return true + } + + return false +} + +// SetSchemaType gets a reference to the given string and assigns it to the SchemaType field. +func (o *TemplateSummaryBucket) SetSchemaType(v string) { + o.SchemaType = &v +} + +func (o TemplateSummaryBucket) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["kind"] = o.Kind + } + if o.TemplateMetaName != nil { + toSerialize["templateMetaName"] = o.TemplateMetaName + } + if true { + toSerialize["envReferences"] = o.EnvReferences + } + if true { + toSerialize["labelAssociations"] = o.LabelAssociations + } + if true { + toSerialize["id"] = o.Id + } + if true { + toSerialize["name"] = o.Name + } + if o.Description != nil { + toSerialize["description"] = o.Description + } + if true { + toSerialize["retentionPeriod"] = o.RetentionPeriod + } + if o.SchemaType != nil { + toSerialize["schemaType"] = o.SchemaType + } + return json.Marshal(toSerialize) +} + +type NullableTemplateSummaryBucket struct { + value *TemplateSummaryBucket + isSet bool +} + +func (v NullableTemplateSummaryBucket) Get() *TemplateSummaryBucket { + return v.value +} + +func (v *NullableTemplateSummaryBucket) Set(val *TemplateSummaryBucket) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateSummaryBucket) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateSummaryBucket) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateSummaryBucket(val *TemplateSummaryBucket) *NullableTemplateSummaryBucket { + return &NullableTemplateSummaryBucket{value: val, isSet: true} +} + +func (v NullableTemplateSummaryBucket) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateSummaryBucket) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/model_template_summary_bucket_all_of.gen.go b/api/model_template_summary_bucket_all_of.gen.go new file mode 100644 index 0000000..fd83a85 --- /dev/null +++ b/api/model_template_summary_bucket_all_of.gen.go @@ -0,0 +1,236 @@ +/* + * Subset of Influx API covered by Influx CLI + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package api + +import ( + "encoding/json" +) + +// TemplateSummaryBucketAllOf struct for TemplateSummaryBucketAllOf +type TemplateSummaryBucketAllOf struct { + Id string `json:"id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + RetentionPeriod int32 `json:"retentionPeriod"` + SchemaType *string `json:"schemaType,omitempty"` +} + +// NewTemplateSummaryBucketAllOf instantiates a new TemplateSummaryBucketAllOf object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateSummaryBucketAllOf(id string, name string, retentionPeriod int32) *TemplateSummaryBucketAllOf { + this := TemplateSummaryBucketAllOf{} + this.Id = id + this.Name = name + this.RetentionPeriod = retentionPeriod + return &this +} + +// NewTemplateSummaryBucketAllOfWithDefaults instantiates a new TemplateSummaryBucketAllOf object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateSummaryBucketAllOfWithDefaults() *TemplateSummaryBucketAllOf { + this := TemplateSummaryBucketAllOf{} + return &this +} + +// GetId returns the Id field value +func (o *TemplateSummaryBucketAllOf) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryBucketAllOf) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *TemplateSummaryBucketAllOf) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *TemplateSummaryBucketAllOf) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryBucketAllOf) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *TemplateSummaryBucketAllOf) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *TemplateSummaryBucketAllOf) GetDescription() string { + if o == nil || o.Description == nil { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryBucketAllOf) GetDescriptionOk() (*string, bool) { + if o == nil || o.Description == nil { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *TemplateSummaryBucketAllOf) HasDescription() bool { + if o != nil && o.Description != nil { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *TemplateSummaryBucketAllOf) SetDescription(v string) { + o.Description = &v +} + +// GetRetentionPeriod returns the RetentionPeriod field value +func (o *TemplateSummaryBucketAllOf) GetRetentionPeriod() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.RetentionPeriod +} + +// GetRetentionPeriodOk returns a tuple with the RetentionPeriod field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryBucketAllOf) GetRetentionPeriodOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.RetentionPeriod, true +} + +// SetRetentionPeriod sets field value +func (o *TemplateSummaryBucketAllOf) SetRetentionPeriod(v int32) { + o.RetentionPeriod = v +} + +// GetSchemaType returns the SchemaType field value if set, zero value otherwise. +func (o *TemplateSummaryBucketAllOf) GetSchemaType() string { + if o == nil || o.SchemaType == nil { + var ret string + return ret + } + return *o.SchemaType +} + +// GetSchemaTypeOk returns a tuple with the SchemaType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryBucketAllOf) GetSchemaTypeOk() (*string, bool) { + if o == nil || o.SchemaType == nil { + return nil, false + } + return o.SchemaType, true +} + +// HasSchemaType returns a boolean if a field has been set. +func (o *TemplateSummaryBucketAllOf) HasSchemaType() bool { + if o != nil && o.SchemaType != nil { + return true + } + + return false +} + +// SetSchemaType gets a reference to the given string and assigns it to the SchemaType field. +func (o *TemplateSummaryBucketAllOf) SetSchemaType(v string) { + o.SchemaType = &v +} + +func (o TemplateSummaryBucketAllOf) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["id"] = o.Id + } + if true { + toSerialize["name"] = o.Name + } + if o.Description != nil { + toSerialize["description"] = o.Description + } + if true { + toSerialize["retentionPeriod"] = o.RetentionPeriod + } + if o.SchemaType != nil { + toSerialize["schemaType"] = o.SchemaType + } + return json.Marshal(toSerialize) +} + +type NullableTemplateSummaryBucketAllOf struct { + value *TemplateSummaryBucketAllOf + isSet bool +} + +func (v NullableTemplateSummaryBucketAllOf) Get() *TemplateSummaryBucketAllOf { + return v.value +} + +func (v *NullableTemplateSummaryBucketAllOf) Set(val *TemplateSummaryBucketAllOf) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateSummaryBucketAllOf) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateSummaryBucketAllOf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateSummaryBucketAllOf(val *TemplateSummaryBucketAllOf) *NullableTemplateSummaryBucketAllOf { + return &NullableTemplateSummaryBucketAllOf{value: val, isSet: true} +} + +func (v NullableTemplateSummaryBucketAllOf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateSummaryBucketAllOf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/model_template_summary_check.gen.go b/api/model_template_summary_check.gen.go new file mode 100644 index 0000000..b9b9e0b --- /dev/null +++ b/api/model_template_summary_check.gen.go @@ -0,0 +1,294 @@ +/* + * Subset of Influx API covered by Influx CLI + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package api + +import ( + "encoding/json" +) + +// TemplateSummaryCheck struct for TemplateSummaryCheck +type TemplateSummaryCheck struct { + Kind string `json:"kind"` + TemplateMetaName *string `json:"templateMetaName,omitempty"` + EnvReferences []TemplateEnvReference `json:"envReferences"` + LabelAssociations []TemplateSummaryLabel `json:"labelAssociations"` + Id string `json:"id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` +} + +// NewTemplateSummaryCheck instantiates a new TemplateSummaryCheck object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateSummaryCheck(kind string, envReferences []TemplateEnvReference, labelAssociations []TemplateSummaryLabel, id string, name string) *TemplateSummaryCheck { + this := TemplateSummaryCheck{} + this.Kind = kind + this.EnvReferences = envReferences + this.LabelAssociations = labelAssociations + this.Id = id + this.Name = name + return &this +} + +// NewTemplateSummaryCheckWithDefaults instantiates a new TemplateSummaryCheck object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateSummaryCheckWithDefaults() *TemplateSummaryCheck { + this := TemplateSummaryCheck{} + return &this +} + +// GetKind returns the Kind field value +func (o *TemplateSummaryCheck) GetKind() string { + if o == nil { + var ret string + return ret + } + + return o.Kind +} + +// GetKindOk returns a tuple with the Kind field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryCheck) GetKindOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Kind, true +} + +// SetKind sets field value +func (o *TemplateSummaryCheck) SetKind(v string) { + o.Kind = v +} + +// GetTemplateMetaName returns the TemplateMetaName field value if set, zero value otherwise. +func (o *TemplateSummaryCheck) GetTemplateMetaName() string { + if o == nil || o.TemplateMetaName == nil { + var ret string + return ret + } + return *o.TemplateMetaName +} + +// GetTemplateMetaNameOk returns a tuple with the TemplateMetaName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryCheck) GetTemplateMetaNameOk() (*string, bool) { + if o == nil || o.TemplateMetaName == nil { + return nil, false + } + return o.TemplateMetaName, true +} + +// HasTemplateMetaName returns a boolean if a field has been set. +func (o *TemplateSummaryCheck) HasTemplateMetaName() bool { + if o != nil && o.TemplateMetaName != nil { + return true + } + + return false +} + +// SetTemplateMetaName gets a reference to the given string and assigns it to the TemplateMetaName field. +func (o *TemplateSummaryCheck) SetTemplateMetaName(v string) { + o.TemplateMetaName = &v +} + +// GetEnvReferences returns the EnvReferences field value +func (o *TemplateSummaryCheck) GetEnvReferences() []TemplateEnvReference { + if o == nil { + var ret []TemplateEnvReference + return ret + } + + return o.EnvReferences +} + +// GetEnvReferencesOk returns a tuple with the EnvReferences field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryCheck) GetEnvReferencesOk() (*[]TemplateEnvReference, bool) { + if o == nil { + return nil, false + } + return &o.EnvReferences, true +} + +// SetEnvReferences sets field value +func (o *TemplateSummaryCheck) SetEnvReferences(v []TemplateEnvReference) { + o.EnvReferences = v +} + +// GetLabelAssociations returns the LabelAssociations field value +func (o *TemplateSummaryCheck) GetLabelAssociations() []TemplateSummaryLabel { + if o == nil { + var ret []TemplateSummaryLabel + return ret + } + + return o.LabelAssociations +} + +// GetLabelAssociationsOk returns a tuple with the LabelAssociations field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryCheck) GetLabelAssociationsOk() (*[]TemplateSummaryLabel, bool) { + if o == nil { + return nil, false + } + return &o.LabelAssociations, true +} + +// SetLabelAssociations sets field value +func (o *TemplateSummaryCheck) SetLabelAssociations(v []TemplateSummaryLabel) { + o.LabelAssociations = v +} + +// GetId returns the Id field value +func (o *TemplateSummaryCheck) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryCheck) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *TemplateSummaryCheck) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *TemplateSummaryCheck) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryCheck) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *TemplateSummaryCheck) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *TemplateSummaryCheck) GetDescription() string { + if o == nil || o.Description == nil { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryCheck) GetDescriptionOk() (*string, bool) { + if o == nil || o.Description == nil { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *TemplateSummaryCheck) HasDescription() bool { + if o != nil && o.Description != nil { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *TemplateSummaryCheck) SetDescription(v string) { + o.Description = &v +} + +func (o TemplateSummaryCheck) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["kind"] = o.Kind + } + if o.TemplateMetaName != nil { + toSerialize["templateMetaName"] = o.TemplateMetaName + } + if true { + toSerialize["envReferences"] = o.EnvReferences + } + if true { + toSerialize["labelAssociations"] = o.LabelAssociations + } + if true { + toSerialize["id"] = o.Id + } + if true { + toSerialize["name"] = o.Name + } + if o.Description != nil { + toSerialize["description"] = o.Description + } + return json.Marshal(toSerialize) +} + +type NullableTemplateSummaryCheck struct { + value *TemplateSummaryCheck + isSet bool +} + +func (v NullableTemplateSummaryCheck) Get() *TemplateSummaryCheck { + return v.value +} + +func (v *NullableTemplateSummaryCheck) Set(val *TemplateSummaryCheck) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateSummaryCheck) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateSummaryCheck) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateSummaryCheck(val *TemplateSummaryCheck) *NullableTemplateSummaryCheck { + return &NullableTemplateSummaryCheck{value: val, isSet: true} +} + +func (v NullableTemplateSummaryCheck) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateSummaryCheck) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/model_template_summary_check_all_of.gen.go b/api/model_template_summary_check_all_of.gen.go new file mode 100644 index 0000000..d667845 --- /dev/null +++ b/api/model_template_summary_check_all_of.gen.go @@ -0,0 +1,171 @@ +/* + * Subset of Influx API covered by Influx CLI + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package api + +import ( + "encoding/json" +) + +// TemplateSummaryCheckAllOf struct for TemplateSummaryCheckAllOf +type TemplateSummaryCheckAllOf struct { + Id string `json:"id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` +} + +// NewTemplateSummaryCheckAllOf instantiates a new TemplateSummaryCheckAllOf object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateSummaryCheckAllOf(id string, name string) *TemplateSummaryCheckAllOf { + this := TemplateSummaryCheckAllOf{} + this.Id = id + this.Name = name + return &this +} + +// NewTemplateSummaryCheckAllOfWithDefaults instantiates a new TemplateSummaryCheckAllOf object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateSummaryCheckAllOfWithDefaults() *TemplateSummaryCheckAllOf { + this := TemplateSummaryCheckAllOf{} + return &this +} + +// GetId returns the Id field value +func (o *TemplateSummaryCheckAllOf) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryCheckAllOf) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *TemplateSummaryCheckAllOf) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *TemplateSummaryCheckAllOf) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryCheckAllOf) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *TemplateSummaryCheckAllOf) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *TemplateSummaryCheckAllOf) GetDescription() string { + if o == nil || o.Description == nil { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryCheckAllOf) GetDescriptionOk() (*string, bool) { + if o == nil || o.Description == nil { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *TemplateSummaryCheckAllOf) HasDescription() bool { + if o != nil && o.Description != nil { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *TemplateSummaryCheckAllOf) SetDescription(v string) { + o.Description = &v +} + +func (o TemplateSummaryCheckAllOf) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["id"] = o.Id + } + if true { + toSerialize["name"] = o.Name + } + if o.Description != nil { + toSerialize["description"] = o.Description + } + return json.Marshal(toSerialize) +} + +type NullableTemplateSummaryCheckAllOf struct { + value *TemplateSummaryCheckAllOf + isSet bool +} + +func (v NullableTemplateSummaryCheckAllOf) Get() *TemplateSummaryCheckAllOf { + return v.value +} + +func (v *NullableTemplateSummaryCheckAllOf) Set(val *TemplateSummaryCheckAllOf) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateSummaryCheckAllOf) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateSummaryCheckAllOf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateSummaryCheckAllOf(val *TemplateSummaryCheckAllOf) *NullableTemplateSummaryCheckAllOf { + return &NullableTemplateSummaryCheckAllOf{value: val, isSet: true} +} + +func (v NullableTemplateSummaryCheckAllOf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateSummaryCheckAllOf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/model_template_summary_common.gen.go b/api/model_template_summary_common.gen.go new file mode 100644 index 0000000..3d5bb00 --- /dev/null +++ b/api/model_template_summary_common.gen.go @@ -0,0 +1,200 @@ +/* + * Subset of Influx API covered by Influx CLI + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package api + +import ( + "encoding/json" +) + +// TemplateSummaryCommon struct for TemplateSummaryCommon +type TemplateSummaryCommon struct { + Kind string `json:"kind"` + TemplateMetaName *string `json:"templateMetaName,omitempty"` + EnvReferences []TemplateEnvReference `json:"envReferences"` + LabelAssociations []TemplateSummaryLabel `json:"labelAssociations"` +} + +// NewTemplateSummaryCommon instantiates a new TemplateSummaryCommon object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateSummaryCommon(kind string, envReferences []TemplateEnvReference, labelAssociations []TemplateSummaryLabel) *TemplateSummaryCommon { + this := TemplateSummaryCommon{} + this.Kind = kind + this.EnvReferences = envReferences + this.LabelAssociations = labelAssociations + return &this +} + +// NewTemplateSummaryCommonWithDefaults instantiates a new TemplateSummaryCommon object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateSummaryCommonWithDefaults() *TemplateSummaryCommon { + this := TemplateSummaryCommon{} + return &this +} + +// GetKind returns the Kind field value +func (o *TemplateSummaryCommon) GetKind() string { + if o == nil { + var ret string + return ret + } + + return o.Kind +} + +// GetKindOk returns a tuple with the Kind field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryCommon) GetKindOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Kind, true +} + +// SetKind sets field value +func (o *TemplateSummaryCommon) SetKind(v string) { + o.Kind = v +} + +// GetTemplateMetaName returns the TemplateMetaName field value if set, zero value otherwise. +func (o *TemplateSummaryCommon) GetTemplateMetaName() string { + if o == nil || o.TemplateMetaName == nil { + var ret string + return ret + } + return *o.TemplateMetaName +} + +// GetTemplateMetaNameOk returns a tuple with the TemplateMetaName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryCommon) GetTemplateMetaNameOk() (*string, bool) { + if o == nil || o.TemplateMetaName == nil { + return nil, false + } + return o.TemplateMetaName, true +} + +// HasTemplateMetaName returns a boolean if a field has been set. +func (o *TemplateSummaryCommon) HasTemplateMetaName() bool { + if o != nil && o.TemplateMetaName != nil { + return true + } + + return false +} + +// SetTemplateMetaName gets a reference to the given string and assigns it to the TemplateMetaName field. +func (o *TemplateSummaryCommon) SetTemplateMetaName(v string) { + o.TemplateMetaName = &v +} + +// GetEnvReferences returns the EnvReferences field value +func (o *TemplateSummaryCommon) GetEnvReferences() []TemplateEnvReference { + if o == nil { + var ret []TemplateEnvReference + return ret + } + + return o.EnvReferences +} + +// GetEnvReferencesOk returns a tuple with the EnvReferences field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryCommon) GetEnvReferencesOk() (*[]TemplateEnvReference, bool) { + if o == nil { + return nil, false + } + return &o.EnvReferences, true +} + +// SetEnvReferences sets field value +func (o *TemplateSummaryCommon) SetEnvReferences(v []TemplateEnvReference) { + o.EnvReferences = v +} + +// GetLabelAssociations returns the LabelAssociations field value +func (o *TemplateSummaryCommon) GetLabelAssociations() []TemplateSummaryLabel { + if o == nil { + var ret []TemplateSummaryLabel + return ret + } + + return o.LabelAssociations +} + +// GetLabelAssociationsOk returns a tuple with the LabelAssociations field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryCommon) GetLabelAssociationsOk() (*[]TemplateSummaryLabel, bool) { + if o == nil { + return nil, false + } + return &o.LabelAssociations, true +} + +// SetLabelAssociations sets field value +func (o *TemplateSummaryCommon) SetLabelAssociations(v []TemplateSummaryLabel) { + o.LabelAssociations = v +} + +func (o TemplateSummaryCommon) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["kind"] = o.Kind + } + if o.TemplateMetaName != nil { + toSerialize["templateMetaName"] = o.TemplateMetaName + } + if true { + toSerialize["envReferences"] = o.EnvReferences + } + if true { + toSerialize["labelAssociations"] = o.LabelAssociations + } + return json.Marshal(toSerialize) +} + +type NullableTemplateSummaryCommon struct { + value *TemplateSummaryCommon + isSet bool +} + +func (v NullableTemplateSummaryCommon) Get() *TemplateSummaryCommon { + return v.value +} + +func (v *NullableTemplateSummaryCommon) Set(val *TemplateSummaryCommon) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateSummaryCommon) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateSummaryCommon) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateSummaryCommon(val *TemplateSummaryCommon) *NullableTemplateSummaryCommon { + return &NullableTemplateSummaryCommon{value: val, isSet: true} +} + +func (v NullableTemplateSummaryCommon) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateSummaryCommon) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/model_template_summary_common_all_of.gen.go b/api/model_template_summary_common_all_of.gen.go new file mode 100644 index 0000000..8ff8b77 --- /dev/null +++ b/api/model_template_summary_common_all_of.gen.go @@ -0,0 +1,106 @@ +/* + * Subset of Influx API covered by Influx CLI + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package api + +import ( + "encoding/json" +) + +// TemplateSummaryCommonAllOf struct for TemplateSummaryCommonAllOf +type TemplateSummaryCommonAllOf struct { + LabelAssociations []TemplateSummaryLabel `json:"labelAssociations"` +} + +// NewTemplateSummaryCommonAllOf instantiates a new TemplateSummaryCommonAllOf object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateSummaryCommonAllOf(labelAssociations []TemplateSummaryLabel) *TemplateSummaryCommonAllOf { + this := TemplateSummaryCommonAllOf{} + this.LabelAssociations = labelAssociations + return &this +} + +// NewTemplateSummaryCommonAllOfWithDefaults instantiates a new TemplateSummaryCommonAllOf object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateSummaryCommonAllOfWithDefaults() *TemplateSummaryCommonAllOf { + this := TemplateSummaryCommonAllOf{} + return &this +} + +// GetLabelAssociations returns the LabelAssociations field value +func (o *TemplateSummaryCommonAllOf) GetLabelAssociations() []TemplateSummaryLabel { + if o == nil { + var ret []TemplateSummaryLabel + return ret + } + + return o.LabelAssociations +} + +// GetLabelAssociationsOk returns a tuple with the LabelAssociations field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryCommonAllOf) GetLabelAssociationsOk() (*[]TemplateSummaryLabel, bool) { + if o == nil { + return nil, false + } + return &o.LabelAssociations, true +} + +// SetLabelAssociations sets field value +func (o *TemplateSummaryCommonAllOf) SetLabelAssociations(v []TemplateSummaryLabel) { + o.LabelAssociations = v +} + +func (o TemplateSummaryCommonAllOf) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["labelAssociations"] = o.LabelAssociations + } + return json.Marshal(toSerialize) +} + +type NullableTemplateSummaryCommonAllOf struct { + value *TemplateSummaryCommonAllOf + isSet bool +} + +func (v NullableTemplateSummaryCommonAllOf) Get() *TemplateSummaryCommonAllOf { + return v.value +} + +func (v *NullableTemplateSummaryCommonAllOf) Set(val *TemplateSummaryCommonAllOf) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateSummaryCommonAllOf) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateSummaryCommonAllOf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateSummaryCommonAllOf(val *TemplateSummaryCommonAllOf) *NullableTemplateSummaryCommonAllOf { + return &NullableTemplateSummaryCommonAllOf{value: val, isSet: true} +} + +func (v NullableTemplateSummaryCommonAllOf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateSummaryCommonAllOf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/model_template_summary_core.gen.go b/api/model_template_summary_core.gen.go new file mode 100644 index 0000000..564fadc --- /dev/null +++ b/api/model_template_summary_core.gen.go @@ -0,0 +1,171 @@ +/* + * Subset of Influx API covered by Influx CLI + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package api + +import ( + "encoding/json" +) + +// TemplateSummaryCore struct for TemplateSummaryCore +type TemplateSummaryCore struct { + Kind string `json:"kind"` + TemplateMetaName *string `json:"templateMetaName,omitempty"` + EnvReferences []TemplateEnvReference `json:"envReferences"` +} + +// NewTemplateSummaryCore instantiates a new TemplateSummaryCore object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateSummaryCore(kind string, envReferences []TemplateEnvReference) *TemplateSummaryCore { + this := TemplateSummaryCore{} + this.Kind = kind + this.EnvReferences = envReferences + return &this +} + +// NewTemplateSummaryCoreWithDefaults instantiates a new TemplateSummaryCore object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateSummaryCoreWithDefaults() *TemplateSummaryCore { + this := TemplateSummaryCore{} + return &this +} + +// GetKind returns the Kind field value +func (o *TemplateSummaryCore) GetKind() string { + if o == nil { + var ret string + return ret + } + + return o.Kind +} + +// GetKindOk returns a tuple with the Kind field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryCore) GetKindOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Kind, true +} + +// SetKind sets field value +func (o *TemplateSummaryCore) SetKind(v string) { + o.Kind = v +} + +// GetTemplateMetaName returns the TemplateMetaName field value if set, zero value otherwise. +func (o *TemplateSummaryCore) GetTemplateMetaName() string { + if o == nil || o.TemplateMetaName == nil { + var ret string + return ret + } + return *o.TemplateMetaName +} + +// GetTemplateMetaNameOk returns a tuple with the TemplateMetaName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryCore) GetTemplateMetaNameOk() (*string, bool) { + if o == nil || o.TemplateMetaName == nil { + return nil, false + } + return o.TemplateMetaName, true +} + +// HasTemplateMetaName returns a boolean if a field has been set. +func (o *TemplateSummaryCore) HasTemplateMetaName() bool { + if o != nil && o.TemplateMetaName != nil { + return true + } + + return false +} + +// SetTemplateMetaName gets a reference to the given string and assigns it to the TemplateMetaName field. +func (o *TemplateSummaryCore) SetTemplateMetaName(v string) { + o.TemplateMetaName = &v +} + +// GetEnvReferences returns the EnvReferences field value +func (o *TemplateSummaryCore) GetEnvReferences() []TemplateEnvReference { + if o == nil { + var ret []TemplateEnvReference + return ret + } + + return o.EnvReferences +} + +// GetEnvReferencesOk returns a tuple with the EnvReferences field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryCore) GetEnvReferencesOk() (*[]TemplateEnvReference, bool) { + if o == nil { + return nil, false + } + return &o.EnvReferences, true +} + +// SetEnvReferences sets field value +func (o *TemplateSummaryCore) SetEnvReferences(v []TemplateEnvReference) { + o.EnvReferences = v +} + +func (o TemplateSummaryCore) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["kind"] = o.Kind + } + if o.TemplateMetaName != nil { + toSerialize["templateMetaName"] = o.TemplateMetaName + } + if true { + toSerialize["envReferences"] = o.EnvReferences + } + return json.Marshal(toSerialize) +} + +type NullableTemplateSummaryCore struct { + value *TemplateSummaryCore + isSet bool +} + +func (v NullableTemplateSummaryCore) Get() *TemplateSummaryCore { + return v.value +} + +func (v *NullableTemplateSummaryCore) Set(val *TemplateSummaryCore) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateSummaryCore) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateSummaryCore) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateSummaryCore(val *TemplateSummaryCore) *NullableTemplateSummaryCore { + return &NullableTemplateSummaryCore{value: val, isSet: true} +} + +func (v NullableTemplateSummaryCore) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateSummaryCore) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/model_template_summary_dashboard.gen.go b/api/model_template_summary_dashboard.gen.go new file mode 100644 index 0000000..0a8e6c2 --- /dev/null +++ b/api/model_template_summary_dashboard.gen.go @@ -0,0 +1,294 @@ +/* + * Subset of Influx API covered by Influx CLI + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package api + +import ( + "encoding/json" +) + +// TemplateSummaryDashboard struct for TemplateSummaryDashboard +type TemplateSummaryDashboard struct { + Kind string `json:"kind"` + TemplateMetaName *string `json:"templateMetaName,omitempty"` + EnvReferences []TemplateEnvReference `json:"envReferences"` + LabelAssociations []TemplateSummaryLabel `json:"labelAssociations"` + Id string `json:"id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` +} + +// NewTemplateSummaryDashboard instantiates a new TemplateSummaryDashboard object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateSummaryDashboard(kind string, envReferences []TemplateEnvReference, labelAssociations []TemplateSummaryLabel, id string, name string) *TemplateSummaryDashboard { + this := TemplateSummaryDashboard{} + this.Kind = kind + this.EnvReferences = envReferences + this.LabelAssociations = labelAssociations + this.Id = id + this.Name = name + return &this +} + +// NewTemplateSummaryDashboardWithDefaults instantiates a new TemplateSummaryDashboard object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateSummaryDashboardWithDefaults() *TemplateSummaryDashboard { + this := TemplateSummaryDashboard{} + return &this +} + +// GetKind returns the Kind field value +func (o *TemplateSummaryDashboard) GetKind() string { + if o == nil { + var ret string + return ret + } + + return o.Kind +} + +// GetKindOk returns a tuple with the Kind field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDashboard) GetKindOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Kind, true +} + +// SetKind sets field value +func (o *TemplateSummaryDashboard) SetKind(v string) { + o.Kind = v +} + +// GetTemplateMetaName returns the TemplateMetaName field value if set, zero value otherwise. +func (o *TemplateSummaryDashboard) GetTemplateMetaName() string { + if o == nil || o.TemplateMetaName == nil { + var ret string + return ret + } + return *o.TemplateMetaName +} + +// GetTemplateMetaNameOk returns a tuple with the TemplateMetaName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDashboard) GetTemplateMetaNameOk() (*string, bool) { + if o == nil || o.TemplateMetaName == nil { + return nil, false + } + return o.TemplateMetaName, true +} + +// HasTemplateMetaName returns a boolean if a field has been set. +func (o *TemplateSummaryDashboard) HasTemplateMetaName() bool { + if o != nil && o.TemplateMetaName != nil { + return true + } + + return false +} + +// SetTemplateMetaName gets a reference to the given string and assigns it to the TemplateMetaName field. +func (o *TemplateSummaryDashboard) SetTemplateMetaName(v string) { + o.TemplateMetaName = &v +} + +// GetEnvReferences returns the EnvReferences field value +func (o *TemplateSummaryDashboard) GetEnvReferences() []TemplateEnvReference { + if o == nil { + var ret []TemplateEnvReference + return ret + } + + return o.EnvReferences +} + +// GetEnvReferencesOk returns a tuple with the EnvReferences field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDashboard) GetEnvReferencesOk() (*[]TemplateEnvReference, bool) { + if o == nil { + return nil, false + } + return &o.EnvReferences, true +} + +// SetEnvReferences sets field value +func (o *TemplateSummaryDashboard) SetEnvReferences(v []TemplateEnvReference) { + o.EnvReferences = v +} + +// GetLabelAssociations returns the LabelAssociations field value +func (o *TemplateSummaryDashboard) GetLabelAssociations() []TemplateSummaryLabel { + if o == nil { + var ret []TemplateSummaryLabel + return ret + } + + return o.LabelAssociations +} + +// GetLabelAssociationsOk returns a tuple with the LabelAssociations field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDashboard) GetLabelAssociationsOk() (*[]TemplateSummaryLabel, bool) { + if o == nil { + return nil, false + } + return &o.LabelAssociations, true +} + +// SetLabelAssociations sets field value +func (o *TemplateSummaryDashboard) SetLabelAssociations(v []TemplateSummaryLabel) { + o.LabelAssociations = v +} + +// GetId returns the Id field value +func (o *TemplateSummaryDashboard) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDashboard) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *TemplateSummaryDashboard) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *TemplateSummaryDashboard) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDashboard) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *TemplateSummaryDashboard) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *TemplateSummaryDashboard) GetDescription() string { + if o == nil || o.Description == nil { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDashboard) GetDescriptionOk() (*string, bool) { + if o == nil || o.Description == nil { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *TemplateSummaryDashboard) HasDescription() bool { + if o != nil && o.Description != nil { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *TemplateSummaryDashboard) SetDescription(v string) { + o.Description = &v +} + +func (o TemplateSummaryDashboard) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["kind"] = o.Kind + } + if o.TemplateMetaName != nil { + toSerialize["templateMetaName"] = o.TemplateMetaName + } + if true { + toSerialize["envReferences"] = o.EnvReferences + } + if true { + toSerialize["labelAssociations"] = o.LabelAssociations + } + if true { + toSerialize["id"] = o.Id + } + if true { + toSerialize["name"] = o.Name + } + if o.Description != nil { + toSerialize["description"] = o.Description + } + return json.Marshal(toSerialize) +} + +type NullableTemplateSummaryDashboard struct { + value *TemplateSummaryDashboard + isSet bool +} + +func (v NullableTemplateSummaryDashboard) Get() *TemplateSummaryDashboard { + return v.value +} + +func (v *NullableTemplateSummaryDashboard) Set(val *TemplateSummaryDashboard) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateSummaryDashboard) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateSummaryDashboard) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateSummaryDashboard(val *TemplateSummaryDashboard) *NullableTemplateSummaryDashboard { + return &NullableTemplateSummaryDashboard{value: val, isSet: true} +} + +func (v NullableTemplateSummaryDashboard) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateSummaryDashboard) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/model_template_summary_diff.gen.go b/api/model_template_summary_diff.gen.go new file mode 100644 index 0000000..49bb7a2 --- /dev/null +++ b/api/model_template_summary_diff.gen.go @@ -0,0 +1,367 @@ +/* + * Subset of Influx API covered by Influx CLI + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package api + +import ( + "encoding/json" +) + +// TemplateSummaryDiff struct for TemplateSummaryDiff +type TemplateSummaryDiff struct { + Buckets []TemplateSummaryDiffBucket `json:"buckets"` + Checks []TemplateSummaryDiffCheck `json:"checks"` + Dashboards []TemplateSummaryDiffDashboard `json:"dashboards"` + Labels []TemplateSummaryDiffLabel `json:"labels"` + LabelMappings []TemplateSummaryLabelMapping `json:"labelMappings"` + NotificationEndpoints []TemplateSummaryDiffNotificationEndpoint `json:"notificationEndpoints"` + NotificationRules []TemplateSummaryDiffNotificationRule `json:"notificationRules"` + Tasks []TemplateSummaryDiffTask `json:"tasks"` + TelegrafConfigs []TemplateSummaryDiffTelegraf `json:"telegrafConfigs"` + Variables []TemplateSummaryDiffVariable `json:"variables"` +} + +// NewTemplateSummaryDiff instantiates a new TemplateSummaryDiff object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateSummaryDiff(buckets []TemplateSummaryDiffBucket, checks []TemplateSummaryDiffCheck, dashboards []TemplateSummaryDiffDashboard, labels []TemplateSummaryDiffLabel, labelMappings []TemplateSummaryLabelMapping, notificationEndpoints []TemplateSummaryDiffNotificationEndpoint, notificationRules []TemplateSummaryDiffNotificationRule, tasks []TemplateSummaryDiffTask, telegrafConfigs []TemplateSummaryDiffTelegraf, variables []TemplateSummaryDiffVariable) *TemplateSummaryDiff { + this := TemplateSummaryDiff{} + this.Buckets = buckets + this.Checks = checks + this.Dashboards = dashboards + this.Labels = labels + this.LabelMappings = labelMappings + this.NotificationEndpoints = notificationEndpoints + this.NotificationRules = notificationRules + this.Tasks = tasks + this.TelegrafConfigs = telegrafConfigs + this.Variables = variables + return &this +} + +// NewTemplateSummaryDiffWithDefaults instantiates a new TemplateSummaryDiff object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateSummaryDiffWithDefaults() *TemplateSummaryDiff { + this := TemplateSummaryDiff{} + return &this +} + +// GetBuckets returns the Buckets field value +func (o *TemplateSummaryDiff) GetBuckets() []TemplateSummaryDiffBucket { + if o == nil { + var ret []TemplateSummaryDiffBucket + return ret + } + + return o.Buckets +} + +// GetBucketsOk returns a tuple with the Buckets field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiff) GetBucketsOk() (*[]TemplateSummaryDiffBucket, bool) { + if o == nil { + return nil, false + } + return &o.Buckets, true +} + +// SetBuckets sets field value +func (o *TemplateSummaryDiff) SetBuckets(v []TemplateSummaryDiffBucket) { + o.Buckets = v +} + +// GetChecks returns the Checks field value +func (o *TemplateSummaryDiff) GetChecks() []TemplateSummaryDiffCheck { + if o == nil { + var ret []TemplateSummaryDiffCheck + return ret + } + + return o.Checks +} + +// GetChecksOk returns a tuple with the Checks field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiff) GetChecksOk() (*[]TemplateSummaryDiffCheck, bool) { + if o == nil { + return nil, false + } + return &o.Checks, true +} + +// SetChecks sets field value +func (o *TemplateSummaryDiff) SetChecks(v []TemplateSummaryDiffCheck) { + o.Checks = v +} + +// GetDashboards returns the Dashboards field value +func (o *TemplateSummaryDiff) GetDashboards() []TemplateSummaryDiffDashboard { + if o == nil { + var ret []TemplateSummaryDiffDashboard + return ret + } + + return o.Dashboards +} + +// GetDashboardsOk returns a tuple with the Dashboards field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiff) GetDashboardsOk() (*[]TemplateSummaryDiffDashboard, bool) { + if o == nil { + return nil, false + } + return &o.Dashboards, true +} + +// SetDashboards sets field value +func (o *TemplateSummaryDiff) SetDashboards(v []TemplateSummaryDiffDashboard) { + o.Dashboards = v +} + +// GetLabels returns the Labels field value +func (o *TemplateSummaryDiff) GetLabels() []TemplateSummaryDiffLabel { + if o == nil { + var ret []TemplateSummaryDiffLabel + return ret + } + + return o.Labels +} + +// GetLabelsOk returns a tuple with the Labels field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiff) GetLabelsOk() (*[]TemplateSummaryDiffLabel, bool) { + if o == nil { + return nil, false + } + return &o.Labels, true +} + +// SetLabels sets field value +func (o *TemplateSummaryDiff) SetLabels(v []TemplateSummaryDiffLabel) { + o.Labels = v +} + +// GetLabelMappings returns the LabelMappings field value +func (o *TemplateSummaryDiff) GetLabelMappings() []TemplateSummaryLabelMapping { + if o == nil { + var ret []TemplateSummaryLabelMapping + return ret + } + + return o.LabelMappings +} + +// GetLabelMappingsOk returns a tuple with the LabelMappings field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiff) GetLabelMappingsOk() (*[]TemplateSummaryLabelMapping, bool) { + if o == nil { + return nil, false + } + return &o.LabelMappings, true +} + +// SetLabelMappings sets field value +func (o *TemplateSummaryDiff) SetLabelMappings(v []TemplateSummaryLabelMapping) { + o.LabelMappings = v +} + +// GetNotificationEndpoints returns the NotificationEndpoints field value +func (o *TemplateSummaryDiff) GetNotificationEndpoints() []TemplateSummaryDiffNotificationEndpoint { + if o == nil { + var ret []TemplateSummaryDiffNotificationEndpoint + return ret + } + + return o.NotificationEndpoints +} + +// GetNotificationEndpointsOk returns a tuple with the NotificationEndpoints field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiff) GetNotificationEndpointsOk() (*[]TemplateSummaryDiffNotificationEndpoint, bool) { + if o == nil { + return nil, false + } + return &o.NotificationEndpoints, true +} + +// SetNotificationEndpoints sets field value +func (o *TemplateSummaryDiff) SetNotificationEndpoints(v []TemplateSummaryDiffNotificationEndpoint) { + o.NotificationEndpoints = v +} + +// GetNotificationRules returns the NotificationRules field value +func (o *TemplateSummaryDiff) GetNotificationRules() []TemplateSummaryDiffNotificationRule { + if o == nil { + var ret []TemplateSummaryDiffNotificationRule + return ret + } + + return o.NotificationRules +} + +// GetNotificationRulesOk returns a tuple with the NotificationRules field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiff) GetNotificationRulesOk() (*[]TemplateSummaryDiffNotificationRule, bool) { + if o == nil { + return nil, false + } + return &o.NotificationRules, true +} + +// SetNotificationRules sets field value +func (o *TemplateSummaryDiff) SetNotificationRules(v []TemplateSummaryDiffNotificationRule) { + o.NotificationRules = v +} + +// GetTasks returns the Tasks field value +func (o *TemplateSummaryDiff) GetTasks() []TemplateSummaryDiffTask { + if o == nil { + var ret []TemplateSummaryDiffTask + return ret + } + + return o.Tasks +} + +// GetTasksOk returns a tuple with the Tasks field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiff) GetTasksOk() (*[]TemplateSummaryDiffTask, bool) { + if o == nil { + return nil, false + } + return &o.Tasks, true +} + +// SetTasks sets field value +func (o *TemplateSummaryDiff) SetTasks(v []TemplateSummaryDiffTask) { + o.Tasks = v +} + +// GetTelegrafConfigs returns the TelegrafConfigs field value +func (o *TemplateSummaryDiff) GetTelegrafConfigs() []TemplateSummaryDiffTelegraf { + if o == nil { + var ret []TemplateSummaryDiffTelegraf + return ret + } + + return o.TelegrafConfigs +} + +// GetTelegrafConfigsOk returns a tuple with the TelegrafConfigs field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiff) GetTelegrafConfigsOk() (*[]TemplateSummaryDiffTelegraf, bool) { + if o == nil { + return nil, false + } + return &o.TelegrafConfigs, true +} + +// SetTelegrafConfigs sets field value +func (o *TemplateSummaryDiff) SetTelegrafConfigs(v []TemplateSummaryDiffTelegraf) { + o.TelegrafConfigs = v +} + +// GetVariables returns the Variables field value +func (o *TemplateSummaryDiff) GetVariables() []TemplateSummaryDiffVariable { + if o == nil { + var ret []TemplateSummaryDiffVariable + return ret + } + + return o.Variables +} + +// GetVariablesOk returns a tuple with the Variables field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiff) GetVariablesOk() (*[]TemplateSummaryDiffVariable, bool) { + if o == nil { + return nil, false + } + return &o.Variables, true +} + +// SetVariables sets field value +func (o *TemplateSummaryDiff) SetVariables(v []TemplateSummaryDiffVariable) { + o.Variables = v +} + +func (o TemplateSummaryDiff) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["buckets"] = o.Buckets + } + if true { + toSerialize["checks"] = o.Checks + } + if true { + toSerialize["dashboards"] = o.Dashboards + } + if true { + toSerialize["labels"] = o.Labels + } + if true { + toSerialize["labelMappings"] = o.LabelMappings + } + if true { + toSerialize["notificationEndpoints"] = o.NotificationEndpoints + } + if true { + toSerialize["notificationRules"] = o.NotificationRules + } + if true { + toSerialize["tasks"] = o.Tasks + } + if true { + toSerialize["telegrafConfigs"] = o.TelegrafConfigs + } + if true { + toSerialize["variables"] = o.Variables + } + return json.Marshal(toSerialize) +} + +type NullableTemplateSummaryDiff struct { + value *TemplateSummaryDiff + isSet bool +} + +func (v NullableTemplateSummaryDiff) Get() *TemplateSummaryDiff { + return v.value +} + +func (v *NullableTemplateSummaryDiff) Set(val *TemplateSummaryDiff) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateSummaryDiff) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateSummaryDiff) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateSummaryDiff(val *TemplateSummaryDiff) *NullableTemplateSummaryDiff { + return &NullableTemplateSummaryDiff{value: val, isSet: true} +} + +func (v NullableTemplateSummaryDiff) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateSummaryDiff) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/model_template_summary_diff_bucket.gen.go b/api/model_template_summary_diff_bucket.gen.go new file mode 100644 index 0000000..fc3f9d1 --- /dev/null +++ b/api/model_template_summary_diff_bucket.gen.go @@ -0,0 +1,265 @@ +/* + * Subset of Influx API covered by Influx CLI + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package api + +import ( + "encoding/json" +) + +// TemplateSummaryDiffBucket struct for TemplateSummaryDiffBucket +type TemplateSummaryDiffBucket struct { + Kind string `json:"kind"` + StateStatus string `json:"stateStatus"` + Id string `json:"id"` + TemplateMetaName string `json:"templateMetaName"` + New *TemplateSummaryDiffBucketFields `json:"new,omitempty"` + Old *TemplateSummaryDiffBucketFields `json:"old,omitempty"` +} + +// NewTemplateSummaryDiffBucket instantiates a new TemplateSummaryDiffBucket object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateSummaryDiffBucket(kind string, stateStatus string, id string, templateMetaName string) *TemplateSummaryDiffBucket { + this := TemplateSummaryDiffBucket{} + this.Kind = kind + this.StateStatus = stateStatus + this.Id = id + this.TemplateMetaName = templateMetaName + return &this +} + +// NewTemplateSummaryDiffBucketWithDefaults instantiates a new TemplateSummaryDiffBucket object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateSummaryDiffBucketWithDefaults() *TemplateSummaryDiffBucket { + this := TemplateSummaryDiffBucket{} + return &this +} + +// GetKind returns the Kind field value +func (o *TemplateSummaryDiffBucket) GetKind() string { + if o == nil { + var ret string + return ret + } + + return o.Kind +} + +// GetKindOk returns a tuple with the Kind field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffBucket) GetKindOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Kind, true +} + +// SetKind sets field value +func (o *TemplateSummaryDiffBucket) SetKind(v string) { + o.Kind = v +} + +// GetStateStatus returns the StateStatus field value +func (o *TemplateSummaryDiffBucket) GetStateStatus() string { + if o == nil { + var ret string + return ret + } + + return o.StateStatus +} + +// GetStateStatusOk returns a tuple with the StateStatus field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffBucket) GetStateStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.StateStatus, true +} + +// SetStateStatus sets field value +func (o *TemplateSummaryDiffBucket) SetStateStatus(v string) { + o.StateStatus = v +} + +// GetId returns the Id field value +func (o *TemplateSummaryDiffBucket) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffBucket) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *TemplateSummaryDiffBucket) SetId(v string) { + o.Id = v +} + +// GetTemplateMetaName returns the TemplateMetaName field value +func (o *TemplateSummaryDiffBucket) GetTemplateMetaName() string { + if o == nil { + var ret string + return ret + } + + return o.TemplateMetaName +} + +// GetTemplateMetaNameOk returns a tuple with the TemplateMetaName field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffBucket) GetTemplateMetaNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TemplateMetaName, true +} + +// SetTemplateMetaName sets field value +func (o *TemplateSummaryDiffBucket) SetTemplateMetaName(v string) { + o.TemplateMetaName = v +} + +// GetNew returns the New field value if set, zero value otherwise. +func (o *TemplateSummaryDiffBucket) GetNew() TemplateSummaryDiffBucketFields { + if o == nil || o.New == nil { + var ret TemplateSummaryDiffBucketFields + return ret + } + return *o.New +} + +// GetNewOk returns a tuple with the New field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffBucket) GetNewOk() (*TemplateSummaryDiffBucketFields, bool) { + if o == nil || o.New == nil { + return nil, false + } + return o.New, true +} + +// HasNew returns a boolean if a field has been set. +func (o *TemplateSummaryDiffBucket) HasNew() bool { + if o != nil && o.New != nil { + return true + } + + return false +} + +// SetNew gets a reference to the given TemplateSummaryDiffBucketFields and assigns it to the New field. +func (o *TemplateSummaryDiffBucket) SetNew(v TemplateSummaryDiffBucketFields) { + o.New = &v +} + +// GetOld returns the Old field value if set, zero value otherwise. +func (o *TemplateSummaryDiffBucket) GetOld() TemplateSummaryDiffBucketFields { + if o == nil || o.Old == nil { + var ret TemplateSummaryDiffBucketFields + return ret + } + return *o.Old +} + +// GetOldOk returns a tuple with the Old field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffBucket) GetOldOk() (*TemplateSummaryDiffBucketFields, bool) { + if o == nil || o.Old == nil { + return nil, false + } + return o.Old, true +} + +// HasOld returns a boolean if a field has been set. +func (o *TemplateSummaryDiffBucket) HasOld() bool { + if o != nil && o.Old != nil { + return true + } + + return false +} + +// SetOld gets a reference to the given TemplateSummaryDiffBucketFields and assigns it to the Old field. +func (o *TemplateSummaryDiffBucket) SetOld(v TemplateSummaryDiffBucketFields) { + o.Old = &v +} + +func (o TemplateSummaryDiffBucket) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["kind"] = o.Kind + } + if true { + toSerialize["stateStatus"] = o.StateStatus + } + if true { + toSerialize["id"] = o.Id + } + if true { + toSerialize["templateMetaName"] = o.TemplateMetaName + } + if o.New != nil { + toSerialize["new"] = o.New + } + if o.Old != nil { + toSerialize["old"] = o.Old + } + return json.Marshal(toSerialize) +} + +type NullableTemplateSummaryDiffBucket struct { + value *TemplateSummaryDiffBucket + isSet bool +} + +func (v NullableTemplateSummaryDiffBucket) Get() *TemplateSummaryDiffBucket { + return v.value +} + +func (v *NullableTemplateSummaryDiffBucket) Set(val *TemplateSummaryDiffBucket) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateSummaryDiffBucket) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateSummaryDiffBucket) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateSummaryDiffBucket(val *TemplateSummaryDiffBucket) *NullableTemplateSummaryDiffBucket { + return &NullableTemplateSummaryDiffBucket{value: val, isSet: true} +} + +func (v NullableTemplateSummaryDiffBucket) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateSummaryDiffBucket) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/model_template_summary_diff_bucket_fields.gen.go b/api/model_template_summary_diff_bucket_fields.gen.go new file mode 100644 index 0000000..2190840 --- /dev/null +++ b/api/model_template_summary_diff_bucket_fields.gen.go @@ -0,0 +1,172 @@ +/* + * Subset of Influx API covered by Influx CLI + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package api + +import ( + "encoding/json" +) + +// TemplateSummaryDiffBucketFields struct for TemplateSummaryDiffBucketFields +type TemplateSummaryDiffBucketFields struct { + Name string `json:"name"` + Description *string `json:"description,omitempty"` + // Rules to expire or retain data. No rules means data never expires. + RetentionRules []RetentionRule `json:"retentionRules"` +} + +// NewTemplateSummaryDiffBucketFields instantiates a new TemplateSummaryDiffBucketFields object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateSummaryDiffBucketFields(name string, retentionRules []RetentionRule) *TemplateSummaryDiffBucketFields { + this := TemplateSummaryDiffBucketFields{} + this.Name = name + this.RetentionRules = retentionRules + return &this +} + +// NewTemplateSummaryDiffBucketFieldsWithDefaults instantiates a new TemplateSummaryDiffBucketFields object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateSummaryDiffBucketFieldsWithDefaults() *TemplateSummaryDiffBucketFields { + this := TemplateSummaryDiffBucketFields{} + return &this +} + +// GetName returns the Name field value +func (o *TemplateSummaryDiffBucketFields) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffBucketFields) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *TemplateSummaryDiffBucketFields) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *TemplateSummaryDiffBucketFields) GetDescription() string { + if o == nil || o.Description == nil { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffBucketFields) GetDescriptionOk() (*string, bool) { + if o == nil || o.Description == nil { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *TemplateSummaryDiffBucketFields) HasDescription() bool { + if o != nil && o.Description != nil { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *TemplateSummaryDiffBucketFields) SetDescription(v string) { + o.Description = &v +} + +// GetRetentionRules returns the RetentionRules field value +func (o *TemplateSummaryDiffBucketFields) GetRetentionRules() []RetentionRule { + if o == nil { + var ret []RetentionRule + return ret + } + + return o.RetentionRules +} + +// GetRetentionRulesOk returns a tuple with the RetentionRules field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffBucketFields) GetRetentionRulesOk() (*[]RetentionRule, bool) { + if o == nil { + return nil, false + } + return &o.RetentionRules, true +} + +// SetRetentionRules sets field value +func (o *TemplateSummaryDiffBucketFields) SetRetentionRules(v []RetentionRule) { + o.RetentionRules = v +} + +func (o TemplateSummaryDiffBucketFields) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["name"] = o.Name + } + if o.Description != nil { + toSerialize["description"] = o.Description + } + if true { + toSerialize["retentionRules"] = o.RetentionRules + } + return json.Marshal(toSerialize) +} + +type NullableTemplateSummaryDiffBucketFields struct { + value *TemplateSummaryDiffBucketFields + isSet bool +} + +func (v NullableTemplateSummaryDiffBucketFields) Get() *TemplateSummaryDiffBucketFields { + return v.value +} + +func (v *NullableTemplateSummaryDiffBucketFields) Set(val *TemplateSummaryDiffBucketFields) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateSummaryDiffBucketFields) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateSummaryDiffBucketFields) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateSummaryDiffBucketFields(val *TemplateSummaryDiffBucketFields) *NullableTemplateSummaryDiffBucketFields { + return &NullableTemplateSummaryDiffBucketFields{value: val, isSet: true} +} + +func (v NullableTemplateSummaryDiffBucketFields) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateSummaryDiffBucketFields) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/model_template_summary_diff_check.gen.go b/api/model_template_summary_diff_check.gen.go new file mode 100644 index 0000000..f9c922b --- /dev/null +++ b/api/model_template_summary_diff_check.gen.go @@ -0,0 +1,265 @@ +/* + * Subset of Influx API covered by Influx CLI + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package api + +import ( + "encoding/json" +) + +// TemplateSummaryDiffCheck struct for TemplateSummaryDiffCheck +type TemplateSummaryDiffCheck struct { + Kind string `json:"kind"` + StateStatus string `json:"stateStatus"` + Id string `json:"id"` + TemplateMetaName string `json:"templateMetaName"` + New *TemplateSummaryDiffCheckFields `json:"new,omitempty"` + Old *TemplateSummaryDiffCheckFields `json:"old,omitempty"` +} + +// NewTemplateSummaryDiffCheck instantiates a new TemplateSummaryDiffCheck object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateSummaryDiffCheck(kind string, stateStatus string, id string, templateMetaName string) *TemplateSummaryDiffCheck { + this := TemplateSummaryDiffCheck{} + this.Kind = kind + this.StateStatus = stateStatus + this.Id = id + this.TemplateMetaName = templateMetaName + return &this +} + +// NewTemplateSummaryDiffCheckWithDefaults instantiates a new TemplateSummaryDiffCheck object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateSummaryDiffCheckWithDefaults() *TemplateSummaryDiffCheck { + this := TemplateSummaryDiffCheck{} + return &this +} + +// GetKind returns the Kind field value +func (o *TemplateSummaryDiffCheck) GetKind() string { + if o == nil { + var ret string + return ret + } + + return o.Kind +} + +// GetKindOk returns a tuple with the Kind field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffCheck) GetKindOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Kind, true +} + +// SetKind sets field value +func (o *TemplateSummaryDiffCheck) SetKind(v string) { + o.Kind = v +} + +// GetStateStatus returns the StateStatus field value +func (o *TemplateSummaryDiffCheck) GetStateStatus() string { + if o == nil { + var ret string + return ret + } + + return o.StateStatus +} + +// GetStateStatusOk returns a tuple with the StateStatus field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffCheck) GetStateStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.StateStatus, true +} + +// SetStateStatus sets field value +func (o *TemplateSummaryDiffCheck) SetStateStatus(v string) { + o.StateStatus = v +} + +// GetId returns the Id field value +func (o *TemplateSummaryDiffCheck) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffCheck) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *TemplateSummaryDiffCheck) SetId(v string) { + o.Id = v +} + +// GetTemplateMetaName returns the TemplateMetaName field value +func (o *TemplateSummaryDiffCheck) GetTemplateMetaName() string { + if o == nil { + var ret string + return ret + } + + return o.TemplateMetaName +} + +// GetTemplateMetaNameOk returns a tuple with the TemplateMetaName field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffCheck) GetTemplateMetaNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TemplateMetaName, true +} + +// SetTemplateMetaName sets field value +func (o *TemplateSummaryDiffCheck) SetTemplateMetaName(v string) { + o.TemplateMetaName = v +} + +// GetNew returns the New field value if set, zero value otherwise. +func (o *TemplateSummaryDiffCheck) GetNew() TemplateSummaryDiffCheckFields { + if o == nil || o.New == nil { + var ret TemplateSummaryDiffCheckFields + return ret + } + return *o.New +} + +// GetNewOk returns a tuple with the New field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffCheck) GetNewOk() (*TemplateSummaryDiffCheckFields, bool) { + if o == nil || o.New == nil { + return nil, false + } + return o.New, true +} + +// HasNew returns a boolean if a field has been set. +func (o *TemplateSummaryDiffCheck) HasNew() bool { + if o != nil && o.New != nil { + return true + } + + return false +} + +// SetNew gets a reference to the given TemplateSummaryDiffCheckFields and assigns it to the New field. +func (o *TemplateSummaryDiffCheck) SetNew(v TemplateSummaryDiffCheckFields) { + o.New = &v +} + +// GetOld returns the Old field value if set, zero value otherwise. +func (o *TemplateSummaryDiffCheck) GetOld() TemplateSummaryDiffCheckFields { + if o == nil || o.Old == nil { + var ret TemplateSummaryDiffCheckFields + return ret + } + return *o.Old +} + +// GetOldOk returns a tuple with the Old field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffCheck) GetOldOk() (*TemplateSummaryDiffCheckFields, bool) { + if o == nil || o.Old == nil { + return nil, false + } + return o.Old, true +} + +// HasOld returns a boolean if a field has been set. +func (o *TemplateSummaryDiffCheck) HasOld() bool { + if o != nil && o.Old != nil { + return true + } + + return false +} + +// SetOld gets a reference to the given TemplateSummaryDiffCheckFields and assigns it to the Old field. +func (o *TemplateSummaryDiffCheck) SetOld(v TemplateSummaryDiffCheckFields) { + o.Old = &v +} + +func (o TemplateSummaryDiffCheck) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["kind"] = o.Kind + } + if true { + toSerialize["stateStatus"] = o.StateStatus + } + if true { + toSerialize["id"] = o.Id + } + if true { + toSerialize["templateMetaName"] = o.TemplateMetaName + } + if o.New != nil { + toSerialize["new"] = o.New + } + if o.Old != nil { + toSerialize["old"] = o.Old + } + return json.Marshal(toSerialize) +} + +type NullableTemplateSummaryDiffCheck struct { + value *TemplateSummaryDiffCheck + isSet bool +} + +func (v NullableTemplateSummaryDiffCheck) Get() *TemplateSummaryDiffCheck { + return v.value +} + +func (v *NullableTemplateSummaryDiffCheck) Set(val *TemplateSummaryDiffCheck) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateSummaryDiffCheck) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateSummaryDiffCheck) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateSummaryDiffCheck(val *TemplateSummaryDiffCheck) *NullableTemplateSummaryDiffCheck { + return &NullableTemplateSummaryDiffCheck{value: val, isSet: true} +} + +func (v NullableTemplateSummaryDiffCheck) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateSummaryDiffCheck) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/model_template_summary_diff_check_fields.gen.go b/api/model_template_summary_diff_check_fields.gen.go new file mode 100644 index 0000000..36a3d78 --- /dev/null +++ b/api/model_template_summary_diff_check_fields.gen.go @@ -0,0 +1,142 @@ +/* + * Subset of Influx API covered by Influx CLI + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package api + +import ( + "encoding/json" +) + +// TemplateSummaryDiffCheckFields struct for TemplateSummaryDiffCheckFields +type TemplateSummaryDiffCheckFields struct { + Name string `json:"name"` + Description *string `json:"description,omitempty"` +} + +// NewTemplateSummaryDiffCheckFields instantiates a new TemplateSummaryDiffCheckFields object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateSummaryDiffCheckFields(name string) *TemplateSummaryDiffCheckFields { + this := TemplateSummaryDiffCheckFields{} + this.Name = name + return &this +} + +// NewTemplateSummaryDiffCheckFieldsWithDefaults instantiates a new TemplateSummaryDiffCheckFields object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateSummaryDiffCheckFieldsWithDefaults() *TemplateSummaryDiffCheckFields { + this := TemplateSummaryDiffCheckFields{} + return &this +} + +// GetName returns the Name field value +func (o *TemplateSummaryDiffCheckFields) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffCheckFields) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *TemplateSummaryDiffCheckFields) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *TemplateSummaryDiffCheckFields) GetDescription() string { + if o == nil || o.Description == nil { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffCheckFields) GetDescriptionOk() (*string, bool) { + if o == nil || o.Description == nil { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *TemplateSummaryDiffCheckFields) HasDescription() bool { + if o != nil && o.Description != nil { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *TemplateSummaryDiffCheckFields) SetDescription(v string) { + o.Description = &v +} + +func (o TemplateSummaryDiffCheckFields) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["name"] = o.Name + } + if o.Description != nil { + toSerialize["description"] = o.Description + } + return json.Marshal(toSerialize) +} + +type NullableTemplateSummaryDiffCheckFields struct { + value *TemplateSummaryDiffCheckFields + isSet bool +} + +func (v NullableTemplateSummaryDiffCheckFields) Get() *TemplateSummaryDiffCheckFields { + return v.value +} + +func (v *NullableTemplateSummaryDiffCheckFields) Set(val *TemplateSummaryDiffCheckFields) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateSummaryDiffCheckFields) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateSummaryDiffCheckFields) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateSummaryDiffCheckFields(val *TemplateSummaryDiffCheckFields) *NullableTemplateSummaryDiffCheckFields { + return &NullableTemplateSummaryDiffCheckFields{value: val, isSet: true} +} + +func (v NullableTemplateSummaryDiffCheckFields) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateSummaryDiffCheckFields) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/model_template_summary_diff_dashboard.gen.go b/api/model_template_summary_diff_dashboard.gen.go new file mode 100644 index 0000000..b44a9d6 --- /dev/null +++ b/api/model_template_summary_diff_dashboard.gen.go @@ -0,0 +1,265 @@ +/* + * Subset of Influx API covered by Influx CLI + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package api + +import ( + "encoding/json" +) + +// TemplateSummaryDiffDashboard struct for TemplateSummaryDiffDashboard +type TemplateSummaryDiffDashboard struct { + StateStatus string `json:"stateStatus"` + Id string `json:"id"` + Kind string `json:"kind"` + TemplateMetaName string `json:"templateMetaName"` + New *TemplateSummaryDiffDashboardFields `json:"new,omitempty"` + Old *TemplateSummaryDiffDashboardFields `json:"old,omitempty"` +} + +// NewTemplateSummaryDiffDashboard instantiates a new TemplateSummaryDiffDashboard object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateSummaryDiffDashboard(stateStatus string, id string, kind string, templateMetaName string) *TemplateSummaryDiffDashboard { + this := TemplateSummaryDiffDashboard{} + this.StateStatus = stateStatus + this.Id = id + this.Kind = kind + this.TemplateMetaName = templateMetaName + return &this +} + +// NewTemplateSummaryDiffDashboardWithDefaults instantiates a new TemplateSummaryDiffDashboard object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateSummaryDiffDashboardWithDefaults() *TemplateSummaryDiffDashboard { + this := TemplateSummaryDiffDashboard{} + return &this +} + +// GetStateStatus returns the StateStatus field value +func (o *TemplateSummaryDiffDashboard) GetStateStatus() string { + if o == nil { + var ret string + return ret + } + + return o.StateStatus +} + +// GetStateStatusOk returns a tuple with the StateStatus field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffDashboard) GetStateStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.StateStatus, true +} + +// SetStateStatus sets field value +func (o *TemplateSummaryDiffDashboard) SetStateStatus(v string) { + o.StateStatus = v +} + +// GetId returns the Id field value +func (o *TemplateSummaryDiffDashboard) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffDashboard) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *TemplateSummaryDiffDashboard) SetId(v string) { + o.Id = v +} + +// GetKind returns the Kind field value +func (o *TemplateSummaryDiffDashboard) GetKind() string { + if o == nil { + var ret string + return ret + } + + return o.Kind +} + +// GetKindOk returns a tuple with the Kind field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffDashboard) GetKindOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Kind, true +} + +// SetKind sets field value +func (o *TemplateSummaryDiffDashboard) SetKind(v string) { + o.Kind = v +} + +// GetTemplateMetaName returns the TemplateMetaName field value +func (o *TemplateSummaryDiffDashboard) GetTemplateMetaName() string { + if o == nil { + var ret string + return ret + } + + return o.TemplateMetaName +} + +// GetTemplateMetaNameOk returns a tuple with the TemplateMetaName field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffDashboard) GetTemplateMetaNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TemplateMetaName, true +} + +// SetTemplateMetaName sets field value +func (o *TemplateSummaryDiffDashboard) SetTemplateMetaName(v string) { + o.TemplateMetaName = v +} + +// GetNew returns the New field value if set, zero value otherwise. +func (o *TemplateSummaryDiffDashboard) GetNew() TemplateSummaryDiffDashboardFields { + if o == nil || o.New == nil { + var ret TemplateSummaryDiffDashboardFields + return ret + } + return *o.New +} + +// GetNewOk returns a tuple with the New field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffDashboard) GetNewOk() (*TemplateSummaryDiffDashboardFields, bool) { + if o == nil || o.New == nil { + return nil, false + } + return o.New, true +} + +// HasNew returns a boolean if a field has been set. +func (o *TemplateSummaryDiffDashboard) HasNew() bool { + if o != nil && o.New != nil { + return true + } + + return false +} + +// SetNew gets a reference to the given TemplateSummaryDiffDashboardFields and assigns it to the New field. +func (o *TemplateSummaryDiffDashboard) SetNew(v TemplateSummaryDiffDashboardFields) { + o.New = &v +} + +// GetOld returns the Old field value if set, zero value otherwise. +func (o *TemplateSummaryDiffDashboard) GetOld() TemplateSummaryDiffDashboardFields { + if o == nil || o.Old == nil { + var ret TemplateSummaryDiffDashboardFields + return ret + } + return *o.Old +} + +// GetOldOk returns a tuple with the Old field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffDashboard) GetOldOk() (*TemplateSummaryDiffDashboardFields, bool) { + if o == nil || o.Old == nil { + return nil, false + } + return o.Old, true +} + +// HasOld returns a boolean if a field has been set. +func (o *TemplateSummaryDiffDashboard) HasOld() bool { + if o != nil && o.Old != nil { + return true + } + + return false +} + +// SetOld gets a reference to the given TemplateSummaryDiffDashboardFields and assigns it to the Old field. +func (o *TemplateSummaryDiffDashboard) SetOld(v TemplateSummaryDiffDashboardFields) { + o.Old = &v +} + +func (o TemplateSummaryDiffDashboard) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["stateStatus"] = o.StateStatus + } + if true { + toSerialize["id"] = o.Id + } + if true { + toSerialize["kind"] = o.Kind + } + if true { + toSerialize["templateMetaName"] = o.TemplateMetaName + } + if o.New != nil { + toSerialize["new"] = o.New + } + if o.Old != nil { + toSerialize["old"] = o.Old + } + return json.Marshal(toSerialize) +} + +type NullableTemplateSummaryDiffDashboard struct { + value *TemplateSummaryDiffDashboard + isSet bool +} + +func (v NullableTemplateSummaryDiffDashboard) Get() *TemplateSummaryDiffDashboard { + return v.value +} + +func (v *NullableTemplateSummaryDiffDashboard) Set(val *TemplateSummaryDiffDashboard) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateSummaryDiffDashboard) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateSummaryDiffDashboard) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateSummaryDiffDashboard(val *TemplateSummaryDiffDashboard) *NullableTemplateSummaryDiffDashboard { + return &NullableTemplateSummaryDiffDashboard{value: val, isSet: true} +} + +func (v NullableTemplateSummaryDiffDashboard) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateSummaryDiffDashboard) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/model_template_summary_diff_dashboard_fields.gen.go b/api/model_template_summary_diff_dashboard_fields.gen.go new file mode 100644 index 0000000..3284124 --- /dev/null +++ b/api/model_template_summary_diff_dashboard_fields.gen.go @@ -0,0 +1,171 @@ +/* + * Subset of Influx API covered by Influx CLI + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package api + +import ( + "encoding/json" +) + +// TemplateSummaryDiffDashboardFields struct for TemplateSummaryDiffDashboardFields +type TemplateSummaryDiffDashboardFields struct { + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Charts []map[string]interface{} `json:"charts"` +} + +// NewTemplateSummaryDiffDashboardFields instantiates a new TemplateSummaryDiffDashboardFields object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateSummaryDiffDashboardFields(name string, charts []map[string]interface{}) *TemplateSummaryDiffDashboardFields { + this := TemplateSummaryDiffDashboardFields{} + this.Name = name + this.Charts = charts + return &this +} + +// NewTemplateSummaryDiffDashboardFieldsWithDefaults instantiates a new TemplateSummaryDiffDashboardFields object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateSummaryDiffDashboardFieldsWithDefaults() *TemplateSummaryDiffDashboardFields { + this := TemplateSummaryDiffDashboardFields{} + return &this +} + +// GetName returns the Name field value +func (o *TemplateSummaryDiffDashboardFields) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffDashboardFields) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *TemplateSummaryDiffDashboardFields) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *TemplateSummaryDiffDashboardFields) GetDescription() string { + if o == nil || o.Description == nil { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffDashboardFields) GetDescriptionOk() (*string, bool) { + if o == nil || o.Description == nil { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *TemplateSummaryDiffDashboardFields) HasDescription() bool { + if o != nil && o.Description != nil { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *TemplateSummaryDiffDashboardFields) SetDescription(v string) { + o.Description = &v +} + +// GetCharts returns the Charts field value +func (o *TemplateSummaryDiffDashboardFields) GetCharts() []map[string]interface{} { + if o == nil { + var ret []map[string]interface{} + return ret + } + + return o.Charts +} + +// GetChartsOk returns a tuple with the Charts field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffDashboardFields) GetChartsOk() (*[]map[string]interface{}, bool) { + if o == nil { + return nil, false + } + return &o.Charts, true +} + +// SetCharts sets field value +func (o *TemplateSummaryDiffDashboardFields) SetCharts(v []map[string]interface{}) { + o.Charts = v +} + +func (o TemplateSummaryDiffDashboardFields) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["name"] = o.Name + } + if o.Description != nil { + toSerialize["description"] = o.Description + } + if true { + toSerialize["charts"] = o.Charts + } + return json.Marshal(toSerialize) +} + +type NullableTemplateSummaryDiffDashboardFields struct { + value *TemplateSummaryDiffDashboardFields + isSet bool +} + +func (v NullableTemplateSummaryDiffDashboardFields) Get() *TemplateSummaryDiffDashboardFields { + return v.value +} + +func (v *NullableTemplateSummaryDiffDashboardFields) Set(val *TemplateSummaryDiffDashboardFields) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateSummaryDiffDashboardFields) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateSummaryDiffDashboardFields) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateSummaryDiffDashboardFields(val *TemplateSummaryDiffDashboardFields) *NullableTemplateSummaryDiffDashboardFields { + return &NullableTemplateSummaryDiffDashboardFields{value: val, isSet: true} +} + +func (v NullableTemplateSummaryDiffDashboardFields) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateSummaryDiffDashboardFields) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/model_template_summary_diff_label.gen.go b/api/model_template_summary_diff_label.gen.go new file mode 100644 index 0000000..4fa930a --- /dev/null +++ b/api/model_template_summary_diff_label.gen.go @@ -0,0 +1,265 @@ +/* + * Subset of Influx API covered by Influx CLI + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package api + +import ( + "encoding/json" +) + +// TemplateSummaryDiffLabel struct for TemplateSummaryDiffLabel +type TemplateSummaryDiffLabel struct { + StateStatus string `json:"stateStatus"` + Kind string `json:"kind"` + Id string `json:"id"` + TemplateMetaName string `json:"templateMetaName"` + New *TemplateSummaryDiffLabelFields `json:"new,omitempty"` + Old *TemplateSummaryDiffLabelFields `json:"old,omitempty"` +} + +// NewTemplateSummaryDiffLabel instantiates a new TemplateSummaryDiffLabel object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateSummaryDiffLabel(stateStatus string, kind string, id string, templateMetaName string) *TemplateSummaryDiffLabel { + this := TemplateSummaryDiffLabel{} + this.StateStatus = stateStatus + this.Kind = kind + this.Id = id + this.TemplateMetaName = templateMetaName + return &this +} + +// NewTemplateSummaryDiffLabelWithDefaults instantiates a new TemplateSummaryDiffLabel object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateSummaryDiffLabelWithDefaults() *TemplateSummaryDiffLabel { + this := TemplateSummaryDiffLabel{} + return &this +} + +// GetStateStatus returns the StateStatus field value +func (o *TemplateSummaryDiffLabel) GetStateStatus() string { + if o == nil { + var ret string + return ret + } + + return o.StateStatus +} + +// GetStateStatusOk returns a tuple with the StateStatus field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffLabel) GetStateStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.StateStatus, true +} + +// SetStateStatus sets field value +func (o *TemplateSummaryDiffLabel) SetStateStatus(v string) { + o.StateStatus = v +} + +// GetKind returns the Kind field value +func (o *TemplateSummaryDiffLabel) GetKind() string { + if o == nil { + var ret string + return ret + } + + return o.Kind +} + +// GetKindOk returns a tuple with the Kind field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffLabel) GetKindOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Kind, true +} + +// SetKind sets field value +func (o *TemplateSummaryDiffLabel) SetKind(v string) { + o.Kind = v +} + +// GetId returns the Id field value +func (o *TemplateSummaryDiffLabel) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffLabel) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *TemplateSummaryDiffLabel) SetId(v string) { + o.Id = v +} + +// GetTemplateMetaName returns the TemplateMetaName field value +func (o *TemplateSummaryDiffLabel) GetTemplateMetaName() string { + if o == nil { + var ret string + return ret + } + + return o.TemplateMetaName +} + +// GetTemplateMetaNameOk returns a tuple with the TemplateMetaName field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffLabel) GetTemplateMetaNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TemplateMetaName, true +} + +// SetTemplateMetaName sets field value +func (o *TemplateSummaryDiffLabel) SetTemplateMetaName(v string) { + o.TemplateMetaName = v +} + +// GetNew returns the New field value if set, zero value otherwise. +func (o *TemplateSummaryDiffLabel) GetNew() TemplateSummaryDiffLabelFields { + if o == nil || o.New == nil { + var ret TemplateSummaryDiffLabelFields + return ret + } + return *o.New +} + +// GetNewOk returns a tuple with the New field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffLabel) GetNewOk() (*TemplateSummaryDiffLabelFields, bool) { + if o == nil || o.New == nil { + return nil, false + } + return o.New, true +} + +// HasNew returns a boolean if a field has been set. +func (o *TemplateSummaryDiffLabel) HasNew() bool { + if o != nil && o.New != nil { + return true + } + + return false +} + +// SetNew gets a reference to the given TemplateSummaryDiffLabelFields and assigns it to the New field. +func (o *TemplateSummaryDiffLabel) SetNew(v TemplateSummaryDiffLabelFields) { + o.New = &v +} + +// GetOld returns the Old field value if set, zero value otherwise. +func (o *TemplateSummaryDiffLabel) GetOld() TemplateSummaryDiffLabelFields { + if o == nil || o.Old == nil { + var ret TemplateSummaryDiffLabelFields + return ret + } + return *o.Old +} + +// GetOldOk returns a tuple with the Old field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffLabel) GetOldOk() (*TemplateSummaryDiffLabelFields, bool) { + if o == nil || o.Old == nil { + return nil, false + } + return o.Old, true +} + +// HasOld returns a boolean if a field has been set. +func (o *TemplateSummaryDiffLabel) HasOld() bool { + if o != nil && o.Old != nil { + return true + } + + return false +} + +// SetOld gets a reference to the given TemplateSummaryDiffLabelFields and assigns it to the Old field. +func (o *TemplateSummaryDiffLabel) SetOld(v TemplateSummaryDiffLabelFields) { + o.Old = &v +} + +func (o TemplateSummaryDiffLabel) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["stateStatus"] = o.StateStatus + } + if true { + toSerialize["kind"] = o.Kind + } + if true { + toSerialize["id"] = o.Id + } + if true { + toSerialize["templateMetaName"] = o.TemplateMetaName + } + if o.New != nil { + toSerialize["new"] = o.New + } + if o.Old != nil { + toSerialize["old"] = o.Old + } + return json.Marshal(toSerialize) +} + +type NullableTemplateSummaryDiffLabel struct { + value *TemplateSummaryDiffLabel + isSet bool +} + +func (v NullableTemplateSummaryDiffLabel) Get() *TemplateSummaryDiffLabel { + return v.value +} + +func (v *NullableTemplateSummaryDiffLabel) Set(val *TemplateSummaryDiffLabel) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateSummaryDiffLabel) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateSummaryDiffLabel) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateSummaryDiffLabel(val *TemplateSummaryDiffLabel) *NullableTemplateSummaryDiffLabel { + return &NullableTemplateSummaryDiffLabel{value: val, isSet: true} +} + +func (v NullableTemplateSummaryDiffLabel) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateSummaryDiffLabel) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/model_template_summary_diff_label_fields.gen.go b/api/model_template_summary_diff_label_fields.gen.go new file mode 100644 index 0000000..1ad9988 --- /dev/null +++ b/api/model_template_summary_diff_label_fields.gen.go @@ -0,0 +1,171 @@ +/* + * Subset of Influx API covered by Influx CLI + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package api + +import ( + "encoding/json" +) + +// TemplateSummaryDiffLabelFields struct for TemplateSummaryDiffLabelFields +type TemplateSummaryDiffLabelFields struct { + Name string `json:"name"` + Color string `json:"color"` + Description *string `json:"description,omitempty"` +} + +// NewTemplateSummaryDiffLabelFields instantiates a new TemplateSummaryDiffLabelFields object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateSummaryDiffLabelFields(name string, color string) *TemplateSummaryDiffLabelFields { + this := TemplateSummaryDiffLabelFields{} + this.Name = name + this.Color = color + return &this +} + +// NewTemplateSummaryDiffLabelFieldsWithDefaults instantiates a new TemplateSummaryDiffLabelFields object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateSummaryDiffLabelFieldsWithDefaults() *TemplateSummaryDiffLabelFields { + this := TemplateSummaryDiffLabelFields{} + return &this +} + +// GetName returns the Name field value +func (o *TemplateSummaryDiffLabelFields) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffLabelFields) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *TemplateSummaryDiffLabelFields) SetName(v string) { + o.Name = v +} + +// GetColor returns the Color field value +func (o *TemplateSummaryDiffLabelFields) GetColor() string { + if o == nil { + var ret string + return ret + } + + return o.Color +} + +// GetColorOk returns a tuple with the Color field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffLabelFields) GetColorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Color, true +} + +// SetColor sets field value +func (o *TemplateSummaryDiffLabelFields) SetColor(v string) { + o.Color = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *TemplateSummaryDiffLabelFields) GetDescription() string { + if o == nil || o.Description == nil { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffLabelFields) GetDescriptionOk() (*string, bool) { + if o == nil || o.Description == nil { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *TemplateSummaryDiffLabelFields) HasDescription() bool { + if o != nil && o.Description != nil { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *TemplateSummaryDiffLabelFields) SetDescription(v string) { + o.Description = &v +} + +func (o TemplateSummaryDiffLabelFields) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["name"] = o.Name + } + if true { + toSerialize["color"] = o.Color + } + if o.Description != nil { + toSerialize["description"] = o.Description + } + return json.Marshal(toSerialize) +} + +type NullableTemplateSummaryDiffLabelFields struct { + value *TemplateSummaryDiffLabelFields + isSet bool +} + +func (v NullableTemplateSummaryDiffLabelFields) Get() *TemplateSummaryDiffLabelFields { + return v.value +} + +func (v *NullableTemplateSummaryDiffLabelFields) Set(val *TemplateSummaryDiffLabelFields) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateSummaryDiffLabelFields) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateSummaryDiffLabelFields) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateSummaryDiffLabelFields(val *TemplateSummaryDiffLabelFields) *NullableTemplateSummaryDiffLabelFields { + return &NullableTemplateSummaryDiffLabelFields{value: val, isSet: true} +} + +func (v NullableTemplateSummaryDiffLabelFields) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateSummaryDiffLabelFields) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/model_template_summary_diff_notification_endpoint.gen.go b/api/model_template_summary_diff_notification_endpoint.gen.go new file mode 100644 index 0000000..9211cc5 --- /dev/null +++ b/api/model_template_summary_diff_notification_endpoint.gen.go @@ -0,0 +1,265 @@ +/* + * Subset of Influx API covered by Influx CLI + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package api + +import ( + "encoding/json" +) + +// TemplateSummaryDiffNotificationEndpoint struct for TemplateSummaryDiffNotificationEndpoint +type TemplateSummaryDiffNotificationEndpoint struct { + Kind string `json:"kind"` + StateStatus string `json:"stateStatus"` + Id string `json:"id"` + TemplateMetaName string `json:"templateMetaName"` + New *TemplateSummaryDiffNotificationEndpointFields `json:"new,omitempty"` + Old *TemplateSummaryDiffNotificationEndpointFields `json:"old,omitempty"` +} + +// NewTemplateSummaryDiffNotificationEndpoint instantiates a new TemplateSummaryDiffNotificationEndpoint object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateSummaryDiffNotificationEndpoint(kind string, stateStatus string, id string, templateMetaName string) *TemplateSummaryDiffNotificationEndpoint { + this := TemplateSummaryDiffNotificationEndpoint{} + this.Kind = kind + this.StateStatus = stateStatus + this.Id = id + this.TemplateMetaName = templateMetaName + return &this +} + +// NewTemplateSummaryDiffNotificationEndpointWithDefaults instantiates a new TemplateSummaryDiffNotificationEndpoint object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateSummaryDiffNotificationEndpointWithDefaults() *TemplateSummaryDiffNotificationEndpoint { + this := TemplateSummaryDiffNotificationEndpoint{} + return &this +} + +// GetKind returns the Kind field value +func (o *TemplateSummaryDiffNotificationEndpoint) GetKind() string { + if o == nil { + var ret string + return ret + } + + return o.Kind +} + +// GetKindOk returns a tuple with the Kind field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffNotificationEndpoint) GetKindOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Kind, true +} + +// SetKind sets field value +func (o *TemplateSummaryDiffNotificationEndpoint) SetKind(v string) { + o.Kind = v +} + +// GetStateStatus returns the StateStatus field value +func (o *TemplateSummaryDiffNotificationEndpoint) GetStateStatus() string { + if o == nil { + var ret string + return ret + } + + return o.StateStatus +} + +// GetStateStatusOk returns a tuple with the StateStatus field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffNotificationEndpoint) GetStateStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.StateStatus, true +} + +// SetStateStatus sets field value +func (o *TemplateSummaryDiffNotificationEndpoint) SetStateStatus(v string) { + o.StateStatus = v +} + +// GetId returns the Id field value +func (o *TemplateSummaryDiffNotificationEndpoint) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffNotificationEndpoint) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *TemplateSummaryDiffNotificationEndpoint) SetId(v string) { + o.Id = v +} + +// GetTemplateMetaName returns the TemplateMetaName field value +func (o *TemplateSummaryDiffNotificationEndpoint) GetTemplateMetaName() string { + if o == nil { + var ret string + return ret + } + + return o.TemplateMetaName +} + +// GetTemplateMetaNameOk returns a tuple with the TemplateMetaName field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffNotificationEndpoint) GetTemplateMetaNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TemplateMetaName, true +} + +// SetTemplateMetaName sets field value +func (o *TemplateSummaryDiffNotificationEndpoint) SetTemplateMetaName(v string) { + o.TemplateMetaName = v +} + +// GetNew returns the New field value if set, zero value otherwise. +func (o *TemplateSummaryDiffNotificationEndpoint) GetNew() TemplateSummaryDiffNotificationEndpointFields { + if o == nil || o.New == nil { + var ret TemplateSummaryDiffNotificationEndpointFields + return ret + } + return *o.New +} + +// GetNewOk returns a tuple with the New field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffNotificationEndpoint) GetNewOk() (*TemplateSummaryDiffNotificationEndpointFields, bool) { + if o == nil || o.New == nil { + return nil, false + } + return o.New, true +} + +// HasNew returns a boolean if a field has been set. +func (o *TemplateSummaryDiffNotificationEndpoint) HasNew() bool { + if o != nil && o.New != nil { + return true + } + + return false +} + +// SetNew gets a reference to the given TemplateSummaryDiffNotificationEndpointFields and assigns it to the New field. +func (o *TemplateSummaryDiffNotificationEndpoint) SetNew(v TemplateSummaryDiffNotificationEndpointFields) { + o.New = &v +} + +// GetOld returns the Old field value if set, zero value otherwise. +func (o *TemplateSummaryDiffNotificationEndpoint) GetOld() TemplateSummaryDiffNotificationEndpointFields { + if o == nil || o.Old == nil { + var ret TemplateSummaryDiffNotificationEndpointFields + return ret + } + return *o.Old +} + +// GetOldOk returns a tuple with the Old field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffNotificationEndpoint) GetOldOk() (*TemplateSummaryDiffNotificationEndpointFields, bool) { + if o == nil || o.Old == nil { + return nil, false + } + return o.Old, true +} + +// HasOld returns a boolean if a field has been set. +func (o *TemplateSummaryDiffNotificationEndpoint) HasOld() bool { + if o != nil && o.Old != nil { + return true + } + + return false +} + +// SetOld gets a reference to the given TemplateSummaryDiffNotificationEndpointFields and assigns it to the Old field. +func (o *TemplateSummaryDiffNotificationEndpoint) SetOld(v TemplateSummaryDiffNotificationEndpointFields) { + o.Old = &v +} + +func (o TemplateSummaryDiffNotificationEndpoint) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["kind"] = o.Kind + } + if true { + toSerialize["stateStatus"] = o.StateStatus + } + if true { + toSerialize["id"] = o.Id + } + if true { + toSerialize["templateMetaName"] = o.TemplateMetaName + } + if o.New != nil { + toSerialize["new"] = o.New + } + if o.Old != nil { + toSerialize["old"] = o.Old + } + return json.Marshal(toSerialize) +} + +type NullableTemplateSummaryDiffNotificationEndpoint struct { + value *TemplateSummaryDiffNotificationEndpoint + isSet bool +} + +func (v NullableTemplateSummaryDiffNotificationEndpoint) Get() *TemplateSummaryDiffNotificationEndpoint { + return v.value +} + +func (v *NullableTemplateSummaryDiffNotificationEndpoint) Set(val *TemplateSummaryDiffNotificationEndpoint) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateSummaryDiffNotificationEndpoint) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateSummaryDiffNotificationEndpoint) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateSummaryDiffNotificationEndpoint(val *TemplateSummaryDiffNotificationEndpoint) *NullableTemplateSummaryDiffNotificationEndpoint { + return &NullableTemplateSummaryDiffNotificationEndpoint{value: val, isSet: true} +} + +func (v NullableTemplateSummaryDiffNotificationEndpoint) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateSummaryDiffNotificationEndpoint) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/model_template_summary_diff_notification_endpoint_fields.gen.go b/api/model_template_summary_diff_notification_endpoint_fields.gen.go new file mode 100644 index 0000000..df05156 --- /dev/null +++ b/api/model_template_summary_diff_notification_endpoint_fields.gen.go @@ -0,0 +1,106 @@ +/* + * Subset of Influx API covered by Influx CLI + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package api + +import ( + "encoding/json" +) + +// TemplateSummaryDiffNotificationEndpointFields struct for TemplateSummaryDiffNotificationEndpointFields +type TemplateSummaryDiffNotificationEndpointFields struct { + Name string `json:"name"` +} + +// NewTemplateSummaryDiffNotificationEndpointFields instantiates a new TemplateSummaryDiffNotificationEndpointFields object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateSummaryDiffNotificationEndpointFields(name string) *TemplateSummaryDiffNotificationEndpointFields { + this := TemplateSummaryDiffNotificationEndpointFields{} + this.Name = name + return &this +} + +// NewTemplateSummaryDiffNotificationEndpointFieldsWithDefaults instantiates a new TemplateSummaryDiffNotificationEndpointFields object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateSummaryDiffNotificationEndpointFieldsWithDefaults() *TemplateSummaryDiffNotificationEndpointFields { + this := TemplateSummaryDiffNotificationEndpointFields{} + return &this +} + +// GetName returns the Name field value +func (o *TemplateSummaryDiffNotificationEndpointFields) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffNotificationEndpointFields) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *TemplateSummaryDiffNotificationEndpointFields) SetName(v string) { + o.Name = v +} + +func (o TemplateSummaryDiffNotificationEndpointFields) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["name"] = o.Name + } + return json.Marshal(toSerialize) +} + +type NullableTemplateSummaryDiffNotificationEndpointFields struct { + value *TemplateSummaryDiffNotificationEndpointFields + isSet bool +} + +func (v NullableTemplateSummaryDiffNotificationEndpointFields) Get() *TemplateSummaryDiffNotificationEndpointFields { + return v.value +} + +func (v *NullableTemplateSummaryDiffNotificationEndpointFields) Set(val *TemplateSummaryDiffNotificationEndpointFields) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateSummaryDiffNotificationEndpointFields) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateSummaryDiffNotificationEndpointFields) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateSummaryDiffNotificationEndpointFields(val *TemplateSummaryDiffNotificationEndpointFields) *NullableTemplateSummaryDiffNotificationEndpointFields { + return &NullableTemplateSummaryDiffNotificationEndpointFields{value: val, isSet: true} +} + +func (v NullableTemplateSummaryDiffNotificationEndpointFields) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateSummaryDiffNotificationEndpointFields) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/model_template_summary_diff_notification_rule.gen.go b/api/model_template_summary_diff_notification_rule.gen.go new file mode 100644 index 0000000..3cff6f1 --- /dev/null +++ b/api/model_template_summary_diff_notification_rule.gen.go @@ -0,0 +1,265 @@ +/* + * Subset of Influx API covered by Influx CLI + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package api + +import ( + "encoding/json" +) + +// TemplateSummaryDiffNotificationRule struct for TemplateSummaryDiffNotificationRule +type TemplateSummaryDiffNotificationRule struct { + Kind string `json:"kind"` + StateStatus string `json:"stateStatus"` + Id string `json:"id"` + TemplateMetaName string `json:"templateMetaName"` + New *TemplateSummaryDiffNotificationRuleFields `json:"new,omitempty"` + Old *TemplateSummaryDiffNotificationRuleFields `json:"old,omitempty"` +} + +// NewTemplateSummaryDiffNotificationRule instantiates a new TemplateSummaryDiffNotificationRule object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateSummaryDiffNotificationRule(kind string, stateStatus string, id string, templateMetaName string) *TemplateSummaryDiffNotificationRule { + this := TemplateSummaryDiffNotificationRule{} + this.Kind = kind + this.StateStatus = stateStatus + this.Id = id + this.TemplateMetaName = templateMetaName + return &this +} + +// NewTemplateSummaryDiffNotificationRuleWithDefaults instantiates a new TemplateSummaryDiffNotificationRule object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateSummaryDiffNotificationRuleWithDefaults() *TemplateSummaryDiffNotificationRule { + this := TemplateSummaryDiffNotificationRule{} + return &this +} + +// GetKind returns the Kind field value +func (o *TemplateSummaryDiffNotificationRule) GetKind() string { + if o == nil { + var ret string + return ret + } + + return o.Kind +} + +// GetKindOk returns a tuple with the Kind field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffNotificationRule) GetKindOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Kind, true +} + +// SetKind sets field value +func (o *TemplateSummaryDiffNotificationRule) SetKind(v string) { + o.Kind = v +} + +// GetStateStatus returns the StateStatus field value +func (o *TemplateSummaryDiffNotificationRule) GetStateStatus() string { + if o == nil { + var ret string + return ret + } + + return o.StateStatus +} + +// GetStateStatusOk returns a tuple with the StateStatus field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffNotificationRule) GetStateStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.StateStatus, true +} + +// SetStateStatus sets field value +func (o *TemplateSummaryDiffNotificationRule) SetStateStatus(v string) { + o.StateStatus = v +} + +// GetId returns the Id field value +func (o *TemplateSummaryDiffNotificationRule) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffNotificationRule) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *TemplateSummaryDiffNotificationRule) SetId(v string) { + o.Id = v +} + +// GetTemplateMetaName returns the TemplateMetaName field value +func (o *TemplateSummaryDiffNotificationRule) GetTemplateMetaName() string { + if o == nil { + var ret string + return ret + } + + return o.TemplateMetaName +} + +// GetTemplateMetaNameOk returns a tuple with the TemplateMetaName field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffNotificationRule) GetTemplateMetaNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TemplateMetaName, true +} + +// SetTemplateMetaName sets field value +func (o *TemplateSummaryDiffNotificationRule) SetTemplateMetaName(v string) { + o.TemplateMetaName = v +} + +// GetNew returns the New field value if set, zero value otherwise. +func (o *TemplateSummaryDiffNotificationRule) GetNew() TemplateSummaryDiffNotificationRuleFields { + if o == nil || o.New == nil { + var ret TemplateSummaryDiffNotificationRuleFields + return ret + } + return *o.New +} + +// GetNewOk returns a tuple with the New field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffNotificationRule) GetNewOk() (*TemplateSummaryDiffNotificationRuleFields, bool) { + if o == nil || o.New == nil { + return nil, false + } + return o.New, true +} + +// HasNew returns a boolean if a field has been set. +func (o *TemplateSummaryDiffNotificationRule) HasNew() bool { + if o != nil && o.New != nil { + return true + } + + return false +} + +// SetNew gets a reference to the given TemplateSummaryDiffNotificationRuleFields and assigns it to the New field. +func (o *TemplateSummaryDiffNotificationRule) SetNew(v TemplateSummaryDiffNotificationRuleFields) { + o.New = &v +} + +// GetOld returns the Old field value if set, zero value otherwise. +func (o *TemplateSummaryDiffNotificationRule) GetOld() TemplateSummaryDiffNotificationRuleFields { + if o == nil || o.Old == nil { + var ret TemplateSummaryDiffNotificationRuleFields + return ret + } + return *o.Old +} + +// GetOldOk returns a tuple with the Old field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffNotificationRule) GetOldOk() (*TemplateSummaryDiffNotificationRuleFields, bool) { + if o == nil || o.Old == nil { + return nil, false + } + return o.Old, true +} + +// HasOld returns a boolean if a field has been set. +func (o *TemplateSummaryDiffNotificationRule) HasOld() bool { + if o != nil && o.Old != nil { + return true + } + + return false +} + +// SetOld gets a reference to the given TemplateSummaryDiffNotificationRuleFields and assigns it to the Old field. +func (o *TemplateSummaryDiffNotificationRule) SetOld(v TemplateSummaryDiffNotificationRuleFields) { + o.Old = &v +} + +func (o TemplateSummaryDiffNotificationRule) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["kind"] = o.Kind + } + if true { + toSerialize["stateStatus"] = o.StateStatus + } + if true { + toSerialize["id"] = o.Id + } + if true { + toSerialize["templateMetaName"] = o.TemplateMetaName + } + if o.New != nil { + toSerialize["new"] = o.New + } + if o.Old != nil { + toSerialize["old"] = o.Old + } + return json.Marshal(toSerialize) +} + +type NullableTemplateSummaryDiffNotificationRule struct { + value *TemplateSummaryDiffNotificationRule + isSet bool +} + +func (v NullableTemplateSummaryDiffNotificationRule) Get() *TemplateSummaryDiffNotificationRule { + return v.value +} + +func (v *NullableTemplateSummaryDiffNotificationRule) Set(val *TemplateSummaryDiffNotificationRule) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateSummaryDiffNotificationRule) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateSummaryDiffNotificationRule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateSummaryDiffNotificationRule(val *TemplateSummaryDiffNotificationRule) *NullableTemplateSummaryDiffNotificationRule { + return &NullableTemplateSummaryDiffNotificationRule{value: val, isSet: true} +} + +func (v NullableTemplateSummaryDiffNotificationRule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateSummaryDiffNotificationRule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/model_template_summary_diff_notification_rule_fields.gen.go b/api/model_template_summary_diff_notification_rule_fields.gen.go new file mode 100644 index 0000000..2beeaea --- /dev/null +++ b/api/model_template_summary_diff_notification_rule_fields.gen.go @@ -0,0 +1,323 @@ +/* + * Subset of Influx API covered by Influx CLI + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package api + +import ( + "encoding/json" +) + +// TemplateSummaryDiffNotificationRuleFields struct for TemplateSummaryDiffNotificationRuleFields +type TemplateSummaryDiffNotificationRuleFields struct { + Name string `json:"name"` + Description *string `json:"description,omitempty"` + EndpointName string `json:"endpointName"` + EndpointID string `json:"endpointID"` + EndpointType string `json:"endpointType"` + Every string `json:"every"` + Offset string `json:"offset"` + MessageTemplate *string `json:"messageTemplate,omitempty"` +} + +// NewTemplateSummaryDiffNotificationRuleFields instantiates a new TemplateSummaryDiffNotificationRuleFields object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateSummaryDiffNotificationRuleFields(name string, endpointName string, endpointID string, endpointType string, every string, offset string) *TemplateSummaryDiffNotificationRuleFields { + this := TemplateSummaryDiffNotificationRuleFields{} + this.Name = name + this.EndpointName = endpointName + this.EndpointID = endpointID + this.EndpointType = endpointType + this.Every = every + this.Offset = offset + return &this +} + +// NewTemplateSummaryDiffNotificationRuleFieldsWithDefaults instantiates a new TemplateSummaryDiffNotificationRuleFields object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateSummaryDiffNotificationRuleFieldsWithDefaults() *TemplateSummaryDiffNotificationRuleFields { + this := TemplateSummaryDiffNotificationRuleFields{} + return &this +} + +// GetName returns the Name field value +func (o *TemplateSummaryDiffNotificationRuleFields) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffNotificationRuleFields) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *TemplateSummaryDiffNotificationRuleFields) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *TemplateSummaryDiffNotificationRuleFields) GetDescription() string { + if o == nil || o.Description == nil { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffNotificationRuleFields) GetDescriptionOk() (*string, bool) { + if o == nil || o.Description == nil { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *TemplateSummaryDiffNotificationRuleFields) HasDescription() bool { + if o != nil && o.Description != nil { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *TemplateSummaryDiffNotificationRuleFields) SetDescription(v string) { + o.Description = &v +} + +// GetEndpointName returns the EndpointName field value +func (o *TemplateSummaryDiffNotificationRuleFields) GetEndpointName() string { + if o == nil { + var ret string + return ret + } + + return o.EndpointName +} + +// GetEndpointNameOk returns a tuple with the EndpointName field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffNotificationRuleFields) GetEndpointNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.EndpointName, true +} + +// SetEndpointName sets field value +func (o *TemplateSummaryDiffNotificationRuleFields) SetEndpointName(v string) { + o.EndpointName = v +} + +// GetEndpointID returns the EndpointID field value +func (o *TemplateSummaryDiffNotificationRuleFields) GetEndpointID() string { + if o == nil { + var ret string + return ret + } + + return o.EndpointID +} + +// GetEndpointIDOk returns a tuple with the EndpointID field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffNotificationRuleFields) GetEndpointIDOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.EndpointID, true +} + +// SetEndpointID sets field value +func (o *TemplateSummaryDiffNotificationRuleFields) SetEndpointID(v string) { + o.EndpointID = v +} + +// GetEndpointType returns the EndpointType field value +func (o *TemplateSummaryDiffNotificationRuleFields) GetEndpointType() string { + if o == nil { + var ret string + return ret + } + + return o.EndpointType +} + +// GetEndpointTypeOk returns a tuple with the EndpointType field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffNotificationRuleFields) GetEndpointTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.EndpointType, true +} + +// SetEndpointType sets field value +func (o *TemplateSummaryDiffNotificationRuleFields) SetEndpointType(v string) { + o.EndpointType = v +} + +// GetEvery returns the Every field value +func (o *TemplateSummaryDiffNotificationRuleFields) GetEvery() string { + if o == nil { + var ret string + return ret + } + + return o.Every +} + +// GetEveryOk returns a tuple with the Every field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffNotificationRuleFields) GetEveryOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Every, true +} + +// SetEvery sets field value +func (o *TemplateSummaryDiffNotificationRuleFields) SetEvery(v string) { + o.Every = v +} + +// GetOffset returns the Offset field value +func (o *TemplateSummaryDiffNotificationRuleFields) GetOffset() string { + if o == nil { + var ret string + return ret + } + + return o.Offset +} + +// GetOffsetOk returns a tuple with the Offset field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffNotificationRuleFields) GetOffsetOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Offset, true +} + +// SetOffset sets field value +func (o *TemplateSummaryDiffNotificationRuleFields) SetOffset(v string) { + o.Offset = v +} + +// GetMessageTemplate returns the MessageTemplate field value if set, zero value otherwise. +func (o *TemplateSummaryDiffNotificationRuleFields) GetMessageTemplate() string { + if o == nil || o.MessageTemplate == nil { + var ret string + return ret + } + return *o.MessageTemplate +} + +// GetMessageTemplateOk returns a tuple with the MessageTemplate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffNotificationRuleFields) GetMessageTemplateOk() (*string, bool) { + if o == nil || o.MessageTemplate == nil { + return nil, false + } + return o.MessageTemplate, true +} + +// HasMessageTemplate returns a boolean if a field has been set. +func (o *TemplateSummaryDiffNotificationRuleFields) HasMessageTemplate() bool { + if o != nil && o.MessageTemplate != nil { + return true + } + + return false +} + +// SetMessageTemplate gets a reference to the given string and assigns it to the MessageTemplate field. +func (o *TemplateSummaryDiffNotificationRuleFields) SetMessageTemplate(v string) { + o.MessageTemplate = &v +} + +func (o TemplateSummaryDiffNotificationRuleFields) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["name"] = o.Name + } + if o.Description != nil { + toSerialize["description"] = o.Description + } + if true { + toSerialize["endpointName"] = o.EndpointName + } + if true { + toSerialize["endpointID"] = o.EndpointID + } + if true { + toSerialize["endpointType"] = o.EndpointType + } + if true { + toSerialize["every"] = o.Every + } + if true { + toSerialize["offset"] = o.Offset + } + if o.MessageTemplate != nil { + toSerialize["messageTemplate"] = o.MessageTemplate + } + return json.Marshal(toSerialize) +} + +type NullableTemplateSummaryDiffNotificationRuleFields struct { + value *TemplateSummaryDiffNotificationRuleFields + isSet bool +} + +func (v NullableTemplateSummaryDiffNotificationRuleFields) Get() *TemplateSummaryDiffNotificationRuleFields { + return v.value +} + +func (v *NullableTemplateSummaryDiffNotificationRuleFields) Set(val *TemplateSummaryDiffNotificationRuleFields) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateSummaryDiffNotificationRuleFields) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateSummaryDiffNotificationRuleFields) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateSummaryDiffNotificationRuleFields(val *TemplateSummaryDiffNotificationRuleFields) *NullableTemplateSummaryDiffNotificationRuleFields { + return &NullableTemplateSummaryDiffNotificationRuleFields{value: val, isSet: true} +} + +func (v NullableTemplateSummaryDiffNotificationRuleFields) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateSummaryDiffNotificationRuleFields) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/model_template_summary_diff_task.gen.go b/api/model_template_summary_diff_task.gen.go new file mode 100644 index 0000000..1442447 --- /dev/null +++ b/api/model_template_summary_diff_task.gen.go @@ -0,0 +1,265 @@ +/* + * Subset of Influx API covered by Influx CLI + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package api + +import ( + "encoding/json" +) + +// TemplateSummaryDiffTask struct for TemplateSummaryDiffTask +type TemplateSummaryDiffTask struct { + Kind string `json:"kind"` + StateStatus string `json:"stateStatus"` + Id string `json:"id"` + TemplateMetaName string `json:"templateMetaName"` + New *TemplateSummaryDiffTaskFields `json:"new,omitempty"` + Old *TemplateSummaryDiffTaskFields `json:"old,omitempty"` +} + +// NewTemplateSummaryDiffTask instantiates a new TemplateSummaryDiffTask object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateSummaryDiffTask(kind string, stateStatus string, id string, templateMetaName string) *TemplateSummaryDiffTask { + this := TemplateSummaryDiffTask{} + this.Kind = kind + this.StateStatus = stateStatus + this.Id = id + this.TemplateMetaName = templateMetaName + return &this +} + +// NewTemplateSummaryDiffTaskWithDefaults instantiates a new TemplateSummaryDiffTask object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateSummaryDiffTaskWithDefaults() *TemplateSummaryDiffTask { + this := TemplateSummaryDiffTask{} + return &this +} + +// GetKind returns the Kind field value +func (o *TemplateSummaryDiffTask) GetKind() string { + if o == nil { + var ret string + return ret + } + + return o.Kind +} + +// GetKindOk returns a tuple with the Kind field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffTask) GetKindOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Kind, true +} + +// SetKind sets field value +func (o *TemplateSummaryDiffTask) SetKind(v string) { + o.Kind = v +} + +// GetStateStatus returns the StateStatus field value +func (o *TemplateSummaryDiffTask) GetStateStatus() string { + if o == nil { + var ret string + return ret + } + + return o.StateStatus +} + +// GetStateStatusOk returns a tuple with the StateStatus field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffTask) GetStateStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.StateStatus, true +} + +// SetStateStatus sets field value +func (o *TemplateSummaryDiffTask) SetStateStatus(v string) { + o.StateStatus = v +} + +// GetId returns the Id field value +func (o *TemplateSummaryDiffTask) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffTask) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *TemplateSummaryDiffTask) SetId(v string) { + o.Id = v +} + +// GetTemplateMetaName returns the TemplateMetaName field value +func (o *TemplateSummaryDiffTask) GetTemplateMetaName() string { + if o == nil { + var ret string + return ret + } + + return o.TemplateMetaName +} + +// GetTemplateMetaNameOk returns a tuple with the TemplateMetaName field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffTask) GetTemplateMetaNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TemplateMetaName, true +} + +// SetTemplateMetaName sets field value +func (o *TemplateSummaryDiffTask) SetTemplateMetaName(v string) { + o.TemplateMetaName = v +} + +// GetNew returns the New field value if set, zero value otherwise. +func (o *TemplateSummaryDiffTask) GetNew() TemplateSummaryDiffTaskFields { + if o == nil || o.New == nil { + var ret TemplateSummaryDiffTaskFields + return ret + } + return *o.New +} + +// GetNewOk returns a tuple with the New field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffTask) GetNewOk() (*TemplateSummaryDiffTaskFields, bool) { + if o == nil || o.New == nil { + return nil, false + } + return o.New, true +} + +// HasNew returns a boolean if a field has been set. +func (o *TemplateSummaryDiffTask) HasNew() bool { + if o != nil && o.New != nil { + return true + } + + return false +} + +// SetNew gets a reference to the given TemplateSummaryDiffTaskFields and assigns it to the New field. +func (o *TemplateSummaryDiffTask) SetNew(v TemplateSummaryDiffTaskFields) { + o.New = &v +} + +// GetOld returns the Old field value if set, zero value otherwise. +func (o *TemplateSummaryDiffTask) GetOld() TemplateSummaryDiffTaskFields { + if o == nil || o.Old == nil { + var ret TemplateSummaryDiffTaskFields + return ret + } + return *o.Old +} + +// GetOldOk returns a tuple with the Old field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffTask) GetOldOk() (*TemplateSummaryDiffTaskFields, bool) { + if o == nil || o.Old == nil { + return nil, false + } + return o.Old, true +} + +// HasOld returns a boolean if a field has been set. +func (o *TemplateSummaryDiffTask) HasOld() bool { + if o != nil && o.Old != nil { + return true + } + + return false +} + +// SetOld gets a reference to the given TemplateSummaryDiffTaskFields and assigns it to the Old field. +func (o *TemplateSummaryDiffTask) SetOld(v TemplateSummaryDiffTaskFields) { + o.Old = &v +} + +func (o TemplateSummaryDiffTask) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["kind"] = o.Kind + } + if true { + toSerialize["stateStatus"] = o.StateStatus + } + if true { + toSerialize["id"] = o.Id + } + if true { + toSerialize["templateMetaName"] = o.TemplateMetaName + } + if o.New != nil { + toSerialize["new"] = o.New + } + if o.Old != nil { + toSerialize["old"] = o.Old + } + return json.Marshal(toSerialize) +} + +type NullableTemplateSummaryDiffTask struct { + value *TemplateSummaryDiffTask + isSet bool +} + +func (v NullableTemplateSummaryDiffTask) Get() *TemplateSummaryDiffTask { + return v.value +} + +func (v *NullableTemplateSummaryDiffTask) Set(val *TemplateSummaryDiffTask) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateSummaryDiffTask) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateSummaryDiffTask) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateSummaryDiffTask(val *TemplateSummaryDiffTask) *NullableTemplateSummaryDiffTask { + return &NullableTemplateSummaryDiffTask{value: val, isSet: true} +} + +func (v NullableTemplateSummaryDiffTask) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateSummaryDiffTask) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/model_template_summary_diff_task_fields.gen.go b/api/model_template_summary_diff_task_fields.gen.go new file mode 100644 index 0000000..e08b8e1 --- /dev/null +++ b/api/model_template_summary_diff_task_fields.gen.go @@ -0,0 +1,315 @@ +/* + * Subset of Influx API covered by Influx CLI + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package api + +import ( + "encoding/json" +) + +// TemplateSummaryDiffTaskFields struct for TemplateSummaryDiffTaskFields +type TemplateSummaryDiffTaskFields struct { + Name string `json:"name"` + Cron *string `json:"cron,omitempty"` + Description *string `json:"description,omitempty"` + Every *string `json:"every,omitempty"` + Offset *string `json:"offset,omitempty"` + Query *string `json:"query,omitempty"` + Status string `json:"status"` +} + +// NewTemplateSummaryDiffTaskFields instantiates a new TemplateSummaryDiffTaskFields object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateSummaryDiffTaskFields(name string, status string) *TemplateSummaryDiffTaskFields { + this := TemplateSummaryDiffTaskFields{} + this.Name = name + this.Status = status + return &this +} + +// NewTemplateSummaryDiffTaskFieldsWithDefaults instantiates a new TemplateSummaryDiffTaskFields object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateSummaryDiffTaskFieldsWithDefaults() *TemplateSummaryDiffTaskFields { + this := TemplateSummaryDiffTaskFields{} + return &this +} + +// GetName returns the Name field value +func (o *TemplateSummaryDiffTaskFields) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffTaskFields) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *TemplateSummaryDiffTaskFields) SetName(v string) { + o.Name = v +} + +// GetCron returns the Cron field value if set, zero value otherwise. +func (o *TemplateSummaryDiffTaskFields) GetCron() string { + if o == nil || o.Cron == nil { + var ret string + return ret + } + return *o.Cron +} + +// GetCronOk returns a tuple with the Cron field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffTaskFields) GetCronOk() (*string, bool) { + if o == nil || o.Cron == nil { + return nil, false + } + return o.Cron, true +} + +// HasCron returns a boolean if a field has been set. +func (o *TemplateSummaryDiffTaskFields) HasCron() bool { + if o != nil && o.Cron != nil { + return true + } + + return false +} + +// SetCron gets a reference to the given string and assigns it to the Cron field. +func (o *TemplateSummaryDiffTaskFields) SetCron(v string) { + o.Cron = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *TemplateSummaryDiffTaskFields) GetDescription() string { + if o == nil || o.Description == nil { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffTaskFields) GetDescriptionOk() (*string, bool) { + if o == nil || o.Description == nil { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *TemplateSummaryDiffTaskFields) HasDescription() bool { + if o != nil && o.Description != nil { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *TemplateSummaryDiffTaskFields) SetDescription(v string) { + o.Description = &v +} + +// GetEvery returns the Every field value if set, zero value otherwise. +func (o *TemplateSummaryDiffTaskFields) GetEvery() string { + if o == nil || o.Every == nil { + var ret string + return ret + } + return *o.Every +} + +// GetEveryOk returns a tuple with the Every field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffTaskFields) GetEveryOk() (*string, bool) { + if o == nil || o.Every == nil { + return nil, false + } + return o.Every, true +} + +// HasEvery returns a boolean if a field has been set. +func (o *TemplateSummaryDiffTaskFields) HasEvery() bool { + if o != nil && o.Every != nil { + return true + } + + return false +} + +// SetEvery gets a reference to the given string and assigns it to the Every field. +func (o *TemplateSummaryDiffTaskFields) SetEvery(v string) { + o.Every = &v +} + +// GetOffset returns the Offset field value if set, zero value otherwise. +func (o *TemplateSummaryDiffTaskFields) GetOffset() string { + if o == nil || o.Offset == nil { + var ret string + return ret + } + return *o.Offset +} + +// GetOffsetOk returns a tuple with the Offset field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffTaskFields) GetOffsetOk() (*string, bool) { + if o == nil || o.Offset == nil { + return nil, false + } + return o.Offset, true +} + +// HasOffset returns a boolean if a field has been set. +func (o *TemplateSummaryDiffTaskFields) HasOffset() bool { + if o != nil && o.Offset != nil { + return true + } + + return false +} + +// SetOffset gets a reference to the given string and assigns it to the Offset field. +func (o *TemplateSummaryDiffTaskFields) SetOffset(v string) { + o.Offset = &v +} + +// GetQuery returns the Query field value if set, zero value otherwise. +func (o *TemplateSummaryDiffTaskFields) GetQuery() string { + if o == nil || o.Query == nil { + var ret string + return ret + } + return *o.Query +} + +// GetQueryOk returns a tuple with the Query field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffTaskFields) GetQueryOk() (*string, bool) { + if o == nil || o.Query == nil { + return nil, false + } + return o.Query, true +} + +// HasQuery returns a boolean if a field has been set. +func (o *TemplateSummaryDiffTaskFields) HasQuery() bool { + if o != nil && o.Query != nil { + return true + } + + return false +} + +// SetQuery gets a reference to the given string and assigns it to the Query field. +func (o *TemplateSummaryDiffTaskFields) SetQuery(v string) { + o.Query = &v +} + +// GetStatus returns the Status field value +func (o *TemplateSummaryDiffTaskFields) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffTaskFields) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *TemplateSummaryDiffTaskFields) SetStatus(v string) { + o.Status = v +} + +func (o TemplateSummaryDiffTaskFields) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["name"] = o.Name + } + if o.Cron != nil { + toSerialize["cron"] = o.Cron + } + if o.Description != nil { + toSerialize["description"] = o.Description + } + if o.Every != nil { + toSerialize["every"] = o.Every + } + if o.Offset != nil { + toSerialize["offset"] = o.Offset + } + if o.Query != nil { + toSerialize["query"] = o.Query + } + if true { + toSerialize["status"] = o.Status + } + return json.Marshal(toSerialize) +} + +type NullableTemplateSummaryDiffTaskFields struct { + value *TemplateSummaryDiffTaskFields + isSet bool +} + +func (v NullableTemplateSummaryDiffTaskFields) Get() *TemplateSummaryDiffTaskFields { + return v.value +} + +func (v *NullableTemplateSummaryDiffTaskFields) Set(val *TemplateSummaryDiffTaskFields) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateSummaryDiffTaskFields) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateSummaryDiffTaskFields) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateSummaryDiffTaskFields(val *TemplateSummaryDiffTaskFields) *NullableTemplateSummaryDiffTaskFields { + return &NullableTemplateSummaryDiffTaskFields{value: val, isSet: true} +} + +func (v NullableTemplateSummaryDiffTaskFields) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateSummaryDiffTaskFields) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/model_template_summary_diff_telegraf.gen.go b/api/model_template_summary_diff_telegraf.gen.go new file mode 100644 index 0000000..95e72ac --- /dev/null +++ b/api/model_template_summary_diff_telegraf.gen.go @@ -0,0 +1,265 @@ +/* + * Subset of Influx API covered by Influx CLI + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package api + +import ( + "encoding/json" +) + +// TemplateSummaryDiffTelegraf struct for TemplateSummaryDiffTelegraf +type TemplateSummaryDiffTelegraf struct { + Kind string `json:"kind"` + StateStatus string `json:"stateStatus"` + Id string `json:"id"` + TemplateMetaName string `json:"templateMetaName"` + New *TemplateSummaryTelegrafConfig `json:"new,omitempty"` + Old *TemplateSummaryTelegrafConfig `json:"old,omitempty"` +} + +// NewTemplateSummaryDiffTelegraf instantiates a new TemplateSummaryDiffTelegraf object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateSummaryDiffTelegraf(kind string, stateStatus string, id string, templateMetaName string) *TemplateSummaryDiffTelegraf { + this := TemplateSummaryDiffTelegraf{} + this.Kind = kind + this.StateStatus = stateStatus + this.Id = id + this.TemplateMetaName = templateMetaName + return &this +} + +// NewTemplateSummaryDiffTelegrafWithDefaults instantiates a new TemplateSummaryDiffTelegraf object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateSummaryDiffTelegrafWithDefaults() *TemplateSummaryDiffTelegraf { + this := TemplateSummaryDiffTelegraf{} + return &this +} + +// GetKind returns the Kind field value +func (o *TemplateSummaryDiffTelegraf) GetKind() string { + if o == nil { + var ret string + return ret + } + + return o.Kind +} + +// GetKindOk returns a tuple with the Kind field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffTelegraf) GetKindOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Kind, true +} + +// SetKind sets field value +func (o *TemplateSummaryDiffTelegraf) SetKind(v string) { + o.Kind = v +} + +// GetStateStatus returns the StateStatus field value +func (o *TemplateSummaryDiffTelegraf) GetStateStatus() string { + if o == nil { + var ret string + return ret + } + + return o.StateStatus +} + +// GetStateStatusOk returns a tuple with the StateStatus field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffTelegraf) GetStateStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.StateStatus, true +} + +// SetStateStatus sets field value +func (o *TemplateSummaryDiffTelegraf) SetStateStatus(v string) { + o.StateStatus = v +} + +// GetId returns the Id field value +func (o *TemplateSummaryDiffTelegraf) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffTelegraf) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *TemplateSummaryDiffTelegraf) SetId(v string) { + o.Id = v +} + +// GetTemplateMetaName returns the TemplateMetaName field value +func (o *TemplateSummaryDiffTelegraf) GetTemplateMetaName() string { + if o == nil { + var ret string + return ret + } + + return o.TemplateMetaName +} + +// GetTemplateMetaNameOk returns a tuple with the TemplateMetaName field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffTelegraf) GetTemplateMetaNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TemplateMetaName, true +} + +// SetTemplateMetaName sets field value +func (o *TemplateSummaryDiffTelegraf) SetTemplateMetaName(v string) { + o.TemplateMetaName = v +} + +// GetNew returns the New field value if set, zero value otherwise. +func (o *TemplateSummaryDiffTelegraf) GetNew() TemplateSummaryTelegrafConfig { + if o == nil || o.New == nil { + var ret TemplateSummaryTelegrafConfig + return ret + } + return *o.New +} + +// GetNewOk returns a tuple with the New field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffTelegraf) GetNewOk() (*TemplateSummaryTelegrafConfig, bool) { + if o == nil || o.New == nil { + return nil, false + } + return o.New, true +} + +// HasNew returns a boolean if a field has been set. +func (o *TemplateSummaryDiffTelegraf) HasNew() bool { + if o != nil && o.New != nil { + return true + } + + return false +} + +// SetNew gets a reference to the given TemplateSummaryTelegrafConfig and assigns it to the New field. +func (o *TemplateSummaryDiffTelegraf) SetNew(v TemplateSummaryTelegrafConfig) { + o.New = &v +} + +// GetOld returns the Old field value if set, zero value otherwise. +func (o *TemplateSummaryDiffTelegraf) GetOld() TemplateSummaryTelegrafConfig { + if o == nil || o.Old == nil { + var ret TemplateSummaryTelegrafConfig + return ret + } + return *o.Old +} + +// GetOldOk returns a tuple with the Old field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffTelegraf) GetOldOk() (*TemplateSummaryTelegrafConfig, bool) { + if o == nil || o.Old == nil { + return nil, false + } + return o.Old, true +} + +// HasOld returns a boolean if a field has been set. +func (o *TemplateSummaryDiffTelegraf) HasOld() bool { + if o != nil && o.Old != nil { + return true + } + + return false +} + +// SetOld gets a reference to the given TemplateSummaryTelegrafConfig and assigns it to the Old field. +func (o *TemplateSummaryDiffTelegraf) SetOld(v TemplateSummaryTelegrafConfig) { + o.Old = &v +} + +func (o TemplateSummaryDiffTelegraf) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["kind"] = o.Kind + } + if true { + toSerialize["stateStatus"] = o.StateStatus + } + if true { + toSerialize["id"] = o.Id + } + if true { + toSerialize["templateMetaName"] = o.TemplateMetaName + } + if o.New != nil { + toSerialize["new"] = o.New + } + if o.Old != nil { + toSerialize["old"] = o.Old + } + return json.Marshal(toSerialize) +} + +type NullableTemplateSummaryDiffTelegraf struct { + value *TemplateSummaryDiffTelegraf + isSet bool +} + +func (v NullableTemplateSummaryDiffTelegraf) Get() *TemplateSummaryDiffTelegraf { + return v.value +} + +func (v *NullableTemplateSummaryDiffTelegraf) Set(val *TemplateSummaryDiffTelegraf) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateSummaryDiffTelegraf) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateSummaryDiffTelegraf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateSummaryDiffTelegraf(val *TemplateSummaryDiffTelegraf) *NullableTemplateSummaryDiffTelegraf { + return &NullableTemplateSummaryDiffTelegraf{value: val, isSet: true} +} + +func (v NullableTemplateSummaryDiffTelegraf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateSummaryDiffTelegraf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/model_template_summary_diff_variable.gen.go b/api/model_template_summary_diff_variable.gen.go new file mode 100644 index 0000000..30ffa8f --- /dev/null +++ b/api/model_template_summary_diff_variable.gen.go @@ -0,0 +1,265 @@ +/* + * Subset of Influx API covered by Influx CLI + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package api + +import ( + "encoding/json" +) + +// TemplateSummaryDiffVariable struct for TemplateSummaryDiffVariable +type TemplateSummaryDiffVariable struct { + Kind string `json:"kind"` + StateStatus string `json:"stateStatus"` + Id string `json:"id"` + TemplateMetaName string `json:"templateMetaName"` + New *TemplateSummaryDiffVariableFields `json:"new,omitempty"` + Old *TemplateSummaryDiffVariableFields `json:"old,omitempty"` +} + +// NewTemplateSummaryDiffVariable instantiates a new TemplateSummaryDiffVariable object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateSummaryDiffVariable(kind string, stateStatus string, id string, templateMetaName string) *TemplateSummaryDiffVariable { + this := TemplateSummaryDiffVariable{} + this.Kind = kind + this.StateStatus = stateStatus + this.Id = id + this.TemplateMetaName = templateMetaName + return &this +} + +// NewTemplateSummaryDiffVariableWithDefaults instantiates a new TemplateSummaryDiffVariable object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateSummaryDiffVariableWithDefaults() *TemplateSummaryDiffVariable { + this := TemplateSummaryDiffVariable{} + return &this +} + +// GetKind returns the Kind field value +func (o *TemplateSummaryDiffVariable) GetKind() string { + if o == nil { + var ret string + return ret + } + + return o.Kind +} + +// GetKindOk returns a tuple with the Kind field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffVariable) GetKindOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Kind, true +} + +// SetKind sets field value +func (o *TemplateSummaryDiffVariable) SetKind(v string) { + o.Kind = v +} + +// GetStateStatus returns the StateStatus field value +func (o *TemplateSummaryDiffVariable) GetStateStatus() string { + if o == nil { + var ret string + return ret + } + + return o.StateStatus +} + +// GetStateStatusOk returns a tuple with the StateStatus field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffVariable) GetStateStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.StateStatus, true +} + +// SetStateStatus sets field value +func (o *TemplateSummaryDiffVariable) SetStateStatus(v string) { + o.StateStatus = v +} + +// GetId returns the Id field value +func (o *TemplateSummaryDiffVariable) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffVariable) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *TemplateSummaryDiffVariable) SetId(v string) { + o.Id = v +} + +// GetTemplateMetaName returns the TemplateMetaName field value +func (o *TemplateSummaryDiffVariable) GetTemplateMetaName() string { + if o == nil { + var ret string + return ret + } + + return o.TemplateMetaName +} + +// GetTemplateMetaNameOk returns a tuple with the TemplateMetaName field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffVariable) GetTemplateMetaNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TemplateMetaName, true +} + +// SetTemplateMetaName sets field value +func (o *TemplateSummaryDiffVariable) SetTemplateMetaName(v string) { + o.TemplateMetaName = v +} + +// GetNew returns the New field value if set, zero value otherwise. +func (o *TemplateSummaryDiffVariable) GetNew() TemplateSummaryDiffVariableFields { + if o == nil || o.New == nil { + var ret TemplateSummaryDiffVariableFields + return ret + } + return *o.New +} + +// GetNewOk returns a tuple with the New field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffVariable) GetNewOk() (*TemplateSummaryDiffVariableFields, bool) { + if o == nil || o.New == nil { + return nil, false + } + return o.New, true +} + +// HasNew returns a boolean if a field has been set. +func (o *TemplateSummaryDiffVariable) HasNew() bool { + if o != nil && o.New != nil { + return true + } + + return false +} + +// SetNew gets a reference to the given TemplateSummaryDiffVariableFields and assigns it to the New field. +func (o *TemplateSummaryDiffVariable) SetNew(v TemplateSummaryDiffVariableFields) { + o.New = &v +} + +// GetOld returns the Old field value if set, zero value otherwise. +func (o *TemplateSummaryDiffVariable) GetOld() TemplateSummaryDiffVariableFields { + if o == nil || o.Old == nil { + var ret TemplateSummaryDiffVariableFields + return ret + } + return *o.Old +} + +// GetOldOk returns a tuple with the Old field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffVariable) GetOldOk() (*TemplateSummaryDiffVariableFields, bool) { + if o == nil || o.Old == nil { + return nil, false + } + return o.Old, true +} + +// HasOld returns a boolean if a field has been set. +func (o *TemplateSummaryDiffVariable) HasOld() bool { + if o != nil && o.Old != nil { + return true + } + + return false +} + +// SetOld gets a reference to the given TemplateSummaryDiffVariableFields and assigns it to the Old field. +func (o *TemplateSummaryDiffVariable) SetOld(v TemplateSummaryDiffVariableFields) { + o.Old = &v +} + +func (o TemplateSummaryDiffVariable) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["kind"] = o.Kind + } + if true { + toSerialize["stateStatus"] = o.StateStatus + } + if true { + toSerialize["id"] = o.Id + } + if true { + toSerialize["templateMetaName"] = o.TemplateMetaName + } + if o.New != nil { + toSerialize["new"] = o.New + } + if o.Old != nil { + toSerialize["old"] = o.Old + } + return json.Marshal(toSerialize) +} + +type NullableTemplateSummaryDiffVariable struct { + value *TemplateSummaryDiffVariable + isSet bool +} + +func (v NullableTemplateSummaryDiffVariable) Get() *TemplateSummaryDiffVariable { + return v.value +} + +func (v *NullableTemplateSummaryDiffVariable) Set(val *TemplateSummaryDiffVariable) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateSummaryDiffVariable) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateSummaryDiffVariable) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateSummaryDiffVariable(val *TemplateSummaryDiffVariable) *NullableTemplateSummaryDiffVariable { + return &NullableTemplateSummaryDiffVariable{value: val, isSet: true} +} + +func (v NullableTemplateSummaryDiffVariable) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateSummaryDiffVariable) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/model_template_summary_diff_variable_fields.gen.go b/api/model_template_summary_diff_variable_fields.gen.go new file mode 100644 index 0000000..38b988d --- /dev/null +++ b/api/model_template_summary_diff_variable_fields.gen.go @@ -0,0 +1,171 @@ +/* + * Subset of Influx API covered by Influx CLI + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package api + +import ( + "encoding/json" +) + +// TemplateSummaryDiffVariableFields struct for TemplateSummaryDiffVariableFields +type TemplateSummaryDiffVariableFields struct { + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Args TemplateSummaryVariableArgs `json:"args"` +} + +// NewTemplateSummaryDiffVariableFields instantiates a new TemplateSummaryDiffVariableFields object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateSummaryDiffVariableFields(name string, args TemplateSummaryVariableArgs) *TemplateSummaryDiffVariableFields { + this := TemplateSummaryDiffVariableFields{} + this.Name = name + this.Args = args + return &this +} + +// NewTemplateSummaryDiffVariableFieldsWithDefaults instantiates a new TemplateSummaryDiffVariableFields object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateSummaryDiffVariableFieldsWithDefaults() *TemplateSummaryDiffVariableFields { + this := TemplateSummaryDiffVariableFields{} + return &this +} + +// GetName returns the Name field value +func (o *TemplateSummaryDiffVariableFields) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffVariableFields) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *TemplateSummaryDiffVariableFields) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *TemplateSummaryDiffVariableFields) GetDescription() string { + if o == nil || o.Description == nil { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffVariableFields) GetDescriptionOk() (*string, bool) { + if o == nil || o.Description == nil { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *TemplateSummaryDiffVariableFields) HasDescription() bool { + if o != nil && o.Description != nil { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *TemplateSummaryDiffVariableFields) SetDescription(v string) { + o.Description = &v +} + +// GetArgs returns the Args field value +func (o *TemplateSummaryDiffVariableFields) GetArgs() TemplateSummaryVariableArgs { + if o == nil { + var ret TemplateSummaryVariableArgs + return ret + } + + return o.Args +} + +// GetArgsOk returns a tuple with the Args field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryDiffVariableFields) GetArgsOk() (*TemplateSummaryVariableArgs, bool) { + if o == nil { + return nil, false + } + return &o.Args, true +} + +// SetArgs sets field value +func (o *TemplateSummaryDiffVariableFields) SetArgs(v TemplateSummaryVariableArgs) { + o.Args = v +} + +func (o TemplateSummaryDiffVariableFields) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["name"] = o.Name + } + if o.Description != nil { + toSerialize["description"] = o.Description + } + if true { + toSerialize["args"] = o.Args + } + return json.Marshal(toSerialize) +} + +type NullableTemplateSummaryDiffVariableFields struct { + value *TemplateSummaryDiffVariableFields + isSet bool +} + +func (v NullableTemplateSummaryDiffVariableFields) Get() *TemplateSummaryDiffVariableFields { + return v.value +} + +func (v *NullableTemplateSummaryDiffVariableFields) Set(val *TemplateSummaryDiffVariableFields) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateSummaryDiffVariableFields) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateSummaryDiffVariableFields) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateSummaryDiffVariableFields(val *TemplateSummaryDiffVariableFields) *NullableTemplateSummaryDiffVariableFields { + return &NullableTemplateSummaryDiffVariableFields{value: val, isSet: true} +} + +func (v NullableTemplateSummaryDiffVariableFields) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateSummaryDiffVariableFields) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/model_template_summary_error.gen.go b/api/model_template_summary_error.gen.go new file mode 100644 index 0000000..b06b7b0 --- /dev/null +++ b/api/model_template_summary_error.gen.go @@ -0,0 +1,193 @@ +/* + * Subset of Influx API covered by Influx CLI + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package api + +import ( + "encoding/json" +) + +// TemplateSummaryError struct for TemplateSummaryError +type TemplateSummaryError struct { + Kind string `json:"kind"` + Reason string `json:"reason"` + Fields []string `json:"fields"` + Indexes []int32 `json:"indexes"` +} + +// NewTemplateSummaryError instantiates a new TemplateSummaryError object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateSummaryError(kind string, reason string, fields []string, indexes []int32) *TemplateSummaryError { + this := TemplateSummaryError{} + this.Kind = kind + this.Reason = reason + this.Fields = fields + this.Indexes = indexes + return &this +} + +// NewTemplateSummaryErrorWithDefaults instantiates a new TemplateSummaryError object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateSummaryErrorWithDefaults() *TemplateSummaryError { + this := TemplateSummaryError{} + return &this +} + +// GetKind returns the Kind field value +func (o *TemplateSummaryError) GetKind() string { + if o == nil { + var ret string + return ret + } + + return o.Kind +} + +// GetKindOk returns a tuple with the Kind field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryError) GetKindOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Kind, true +} + +// SetKind sets field value +func (o *TemplateSummaryError) SetKind(v string) { + o.Kind = v +} + +// GetReason returns the Reason field value +func (o *TemplateSummaryError) GetReason() string { + if o == nil { + var ret string + return ret + } + + return o.Reason +} + +// GetReasonOk returns a tuple with the Reason field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryError) GetReasonOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Reason, true +} + +// SetReason sets field value +func (o *TemplateSummaryError) SetReason(v string) { + o.Reason = v +} + +// GetFields returns the Fields field value +func (o *TemplateSummaryError) GetFields() []string { + if o == nil { + var ret []string + return ret + } + + return o.Fields +} + +// GetFieldsOk returns a tuple with the Fields field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryError) GetFieldsOk() (*[]string, bool) { + if o == nil { + return nil, false + } + return &o.Fields, true +} + +// SetFields sets field value +func (o *TemplateSummaryError) SetFields(v []string) { + o.Fields = v +} + +// GetIndexes returns the Indexes field value +func (o *TemplateSummaryError) GetIndexes() []int32 { + if o == nil { + var ret []int32 + return ret + } + + return o.Indexes +} + +// GetIndexesOk returns a tuple with the Indexes field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryError) GetIndexesOk() (*[]int32, bool) { + if o == nil { + return nil, false + } + return &o.Indexes, true +} + +// SetIndexes sets field value +func (o *TemplateSummaryError) SetIndexes(v []int32) { + o.Indexes = v +} + +func (o TemplateSummaryError) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["kind"] = o.Kind + } + if true { + toSerialize["reason"] = o.Reason + } + if true { + toSerialize["fields"] = o.Fields + } + if true { + toSerialize["indexes"] = o.Indexes + } + return json.Marshal(toSerialize) +} + +type NullableTemplateSummaryError struct { + value *TemplateSummaryError + isSet bool +} + +func (v NullableTemplateSummaryError) Get() *TemplateSummaryError { + return v.value +} + +func (v *NullableTemplateSummaryError) Set(val *TemplateSummaryError) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateSummaryError) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateSummaryError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateSummaryError(val *TemplateSummaryError) *NullableTemplateSummaryError { + return &NullableTemplateSummaryError{value: val, isSet: true} +} + +func (v NullableTemplateSummaryError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateSummaryError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/model_template_summary_label.gen.go b/api/model_template_summary_label.gen.go new file mode 100644 index 0000000..bce8306 --- /dev/null +++ b/api/model_template_summary_label.gen.go @@ -0,0 +1,294 @@ +/* + * Subset of Influx API covered by Influx CLI + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package api + +import ( + "encoding/json" +) + +// TemplateSummaryLabel struct for TemplateSummaryLabel +type TemplateSummaryLabel struct { + Kind string `json:"kind"` + TemplateMetaName *string `json:"templateMetaName,omitempty"` + EnvReferences []TemplateEnvReference `json:"envReferences"` + Id string `json:"id"` + OrgID *string `json:"orgID,omitempty"` + Name string `json:"name"` + Properties TemplateSummaryLabelAllOfProperties `json:"properties"` +} + +// NewTemplateSummaryLabel instantiates a new TemplateSummaryLabel object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateSummaryLabel(kind string, envReferences []TemplateEnvReference, id string, name string, properties TemplateSummaryLabelAllOfProperties) *TemplateSummaryLabel { + this := TemplateSummaryLabel{} + this.Kind = kind + this.EnvReferences = envReferences + this.Id = id + this.Name = name + this.Properties = properties + return &this +} + +// NewTemplateSummaryLabelWithDefaults instantiates a new TemplateSummaryLabel object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateSummaryLabelWithDefaults() *TemplateSummaryLabel { + this := TemplateSummaryLabel{} + return &this +} + +// GetKind returns the Kind field value +func (o *TemplateSummaryLabel) GetKind() string { + if o == nil { + var ret string + return ret + } + + return o.Kind +} + +// GetKindOk returns a tuple with the Kind field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryLabel) GetKindOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Kind, true +} + +// SetKind sets field value +func (o *TemplateSummaryLabel) SetKind(v string) { + o.Kind = v +} + +// GetTemplateMetaName returns the TemplateMetaName field value if set, zero value otherwise. +func (o *TemplateSummaryLabel) GetTemplateMetaName() string { + if o == nil || o.TemplateMetaName == nil { + var ret string + return ret + } + return *o.TemplateMetaName +} + +// GetTemplateMetaNameOk returns a tuple with the TemplateMetaName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryLabel) GetTemplateMetaNameOk() (*string, bool) { + if o == nil || o.TemplateMetaName == nil { + return nil, false + } + return o.TemplateMetaName, true +} + +// HasTemplateMetaName returns a boolean if a field has been set. +func (o *TemplateSummaryLabel) HasTemplateMetaName() bool { + if o != nil && o.TemplateMetaName != nil { + return true + } + + return false +} + +// SetTemplateMetaName gets a reference to the given string and assigns it to the TemplateMetaName field. +func (o *TemplateSummaryLabel) SetTemplateMetaName(v string) { + o.TemplateMetaName = &v +} + +// GetEnvReferences returns the EnvReferences field value +func (o *TemplateSummaryLabel) GetEnvReferences() []TemplateEnvReference { + if o == nil { + var ret []TemplateEnvReference + return ret + } + + return o.EnvReferences +} + +// GetEnvReferencesOk returns a tuple with the EnvReferences field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryLabel) GetEnvReferencesOk() (*[]TemplateEnvReference, bool) { + if o == nil { + return nil, false + } + return &o.EnvReferences, true +} + +// SetEnvReferences sets field value +func (o *TemplateSummaryLabel) SetEnvReferences(v []TemplateEnvReference) { + o.EnvReferences = v +} + +// GetId returns the Id field value +func (o *TemplateSummaryLabel) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryLabel) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *TemplateSummaryLabel) SetId(v string) { + o.Id = v +} + +// GetOrgID returns the OrgID field value if set, zero value otherwise. +func (o *TemplateSummaryLabel) GetOrgID() string { + if o == nil || o.OrgID == nil { + var ret string + return ret + } + return *o.OrgID +} + +// GetOrgIDOk returns a tuple with the OrgID field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryLabel) GetOrgIDOk() (*string, bool) { + if o == nil || o.OrgID == nil { + return nil, false + } + return o.OrgID, true +} + +// HasOrgID returns a boolean if a field has been set. +func (o *TemplateSummaryLabel) HasOrgID() bool { + if o != nil && o.OrgID != nil { + return true + } + + return false +} + +// SetOrgID gets a reference to the given string and assigns it to the OrgID field. +func (o *TemplateSummaryLabel) SetOrgID(v string) { + o.OrgID = &v +} + +// GetName returns the Name field value +func (o *TemplateSummaryLabel) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryLabel) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *TemplateSummaryLabel) SetName(v string) { + o.Name = v +} + +// GetProperties returns the Properties field value +func (o *TemplateSummaryLabel) GetProperties() TemplateSummaryLabelAllOfProperties { + if o == nil { + var ret TemplateSummaryLabelAllOfProperties + return ret + } + + return o.Properties +} + +// GetPropertiesOk returns a tuple with the Properties field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryLabel) GetPropertiesOk() (*TemplateSummaryLabelAllOfProperties, bool) { + if o == nil { + return nil, false + } + return &o.Properties, true +} + +// SetProperties sets field value +func (o *TemplateSummaryLabel) SetProperties(v TemplateSummaryLabelAllOfProperties) { + o.Properties = v +} + +func (o TemplateSummaryLabel) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["kind"] = o.Kind + } + if o.TemplateMetaName != nil { + toSerialize["templateMetaName"] = o.TemplateMetaName + } + if true { + toSerialize["envReferences"] = o.EnvReferences + } + if true { + toSerialize["id"] = o.Id + } + if o.OrgID != nil { + toSerialize["orgID"] = o.OrgID + } + if true { + toSerialize["name"] = o.Name + } + if true { + toSerialize["properties"] = o.Properties + } + return json.Marshal(toSerialize) +} + +type NullableTemplateSummaryLabel struct { + value *TemplateSummaryLabel + isSet bool +} + +func (v NullableTemplateSummaryLabel) Get() *TemplateSummaryLabel { + return v.value +} + +func (v *NullableTemplateSummaryLabel) Set(val *TemplateSummaryLabel) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateSummaryLabel) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateSummaryLabel) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateSummaryLabel(val *TemplateSummaryLabel) *NullableTemplateSummaryLabel { + return &NullableTemplateSummaryLabel{value: val, isSet: true} +} + +func (v NullableTemplateSummaryLabel) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateSummaryLabel) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/model_template_summary_label_all_of.gen.go b/api/model_template_summary_label_all_of.gen.go new file mode 100644 index 0000000..73a119e --- /dev/null +++ b/api/model_template_summary_label_all_of.gen.go @@ -0,0 +1,200 @@ +/* + * Subset of Influx API covered by Influx CLI + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package api + +import ( + "encoding/json" +) + +// TemplateSummaryLabelAllOf struct for TemplateSummaryLabelAllOf +type TemplateSummaryLabelAllOf struct { + Id string `json:"id"` + OrgID *string `json:"orgID,omitempty"` + Name string `json:"name"` + Properties TemplateSummaryLabelAllOfProperties `json:"properties"` +} + +// NewTemplateSummaryLabelAllOf instantiates a new TemplateSummaryLabelAllOf object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateSummaryLabelAllOf(id string, name string, properties TemplateSummaryLabelAllOfProperties) *TemplateSummaryLabelAllOf { + this := TemplateSummaryLabelAllOf{} + this.Id = id + this.Name = name + this.Properties = properties + return &this +} + +// NewTemplateSummaryLabelAllOfWithDefaults instantiates a new TemplateSummaryLabelAllOf object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateSummaryLabelAllOfWithDefaults() *TemplateSummaryLabelAllOf { + this := TemplateSummaryLabelAllOf{} + return &this +} + +// GetId returns the Id field value +func (o *TemplateSummaryLabelAllOf) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryLabelAllOf) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *TemplateSummaryLabelAllOf) SetId(v string) { + o.Id = v +} + +// GetOrgID returns the OrgID field value if set, zero value otherwise. +func (o *TemplateSummaryLabelAllOf) GetOrgID() string { + if o == nil || o.OrgID == nil { + var ret string + return ret + } + return *o.OrgID +} + +// GetOrgIDOk returns a tuple with the OrgID field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryLabelAllOf) GetOrgIDOk() (*string, bool) { + if o == nil || o.OrgID == nil { + return nil, false + } + return o.OrgID, true +} + +// HasOrgID returns a boolean if a field has been set. +func (o *TemplateSummaryLabelAllOf) HasOrgID() bool { + if o != nil && o.OrgID != nil { + return true + } + + return false +} + +// SetOrgID gets a reference to the given string and assigns it to the OrgID field. +func (o *TemplateSummaryLabelAllOf) SetOrgID(v string) { + o.OrgID = &v +} + +// GetName returns the Name field value +func (o *TemplateSummaryLabelAllOf) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryLabelAllOf) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *TemplateSummaryLabelAllOf) SetName(v string) { + o.Name = v +} + +// GetProperties returns the Properties field value +func (o *TemplateSummaryLabelAllOf) GetProperties() TemplateSummaryLabelAllOfProperties { + if o == nil { + var ret TemplateSummaryLabelAllOfProperties + return ret + } + + return o.Properties +} + +// GetPropertiesOk returns a tuple with the Properties field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryLabelAllOf) GetPropertiesOk() (*TemplateSummaryLabelAllOfProperties, bool) { + if o == nil { + return nil, false + } + return &o.Properties, true +} + +// SetProperties sets field value +func (o *TemplateSummaryLabelAllOf) SetProperties(v TemplateSummaryLabelAllOfProperties) { + o.Properties = v +} + +func (o TemplateSummaryLabelAllOf) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["id"] = o.Id + } + if o.OrgID != nil { + toSerialize["orgID"] = o.OrgID + } + if true { + toSerialize["name"] = o.Name + } + if true { + toSerialize["properties"] = o.Properties + } + return json.Marshal(toSerialize) +} + +type NullableTemplateSummaryLabelAllOf struct { + value *TemplateSummaryLabelAllOf + isSet bool +} + +func (v NullableTemplateSummaryLabelAllOf) Get() *TemplateSummaryLabelAllOf { + return v.value +} + +func (v *NullableTemplateSummaryLabelAllOf) Set(val *TemplateSummaryLabelAllOf) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateSummaryLabelAllOf) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateSummaryLabelAllOf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateSummaryLabelAllOf(val *TemplateSummaryLabelAllOf) *NullableTemplateSummaryLabelAllOf { + return &NullableTemplateSummaryLabelAllOf{value: val, isSet: true} +} + +func (v NullableTemplateSummaryLabelAllOf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateSummaryLabelAllOf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/model_template_summary_label_all_of_properties.gen.go b/api/model_template_summary_label_all_of_properties.gen.go new file mode 100644 index 0000000..4350bb9 --- /dev/null +++ b/api/model_template_summary_label_all_of_properties.gen.go @@ -0,0 +1,142 @@ +/* + * Subset of Influx API covered by Influx CLI + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package api + +import ( + "encoding/json" +) + +// TemplateSummaryLabelAllOfProperties struct for TemplateSummaryLabelAllOfProperties +type TemplateSummaryLabelAllOfProperties struct { + Color string `json:"color"` + Description *string `json:"description,omitempty"` +} + +// NewTemplateSummaryLabelAllOfProperties instantiates a new TemplateSummaryLabelAllOfProperties object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateSummaryLabelAllOfProperties(color string) *TemplateSummaryLabelAllOfProperties { + this := TemplateSummaryLabelAllOfProperties{} + this.Color = color + return &this +} + +// NewTemplateSummaryLabelAllOfPropertiesWithDefaults instantiates a new TemplateSummaryLabelAllOfProperties object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateSummaryLabelAllOfPropertiesWithDefaults() *TemplateSummaryLabelAllOfProperties { + this := TemplateSummaryLabelAllOfProperties{} + return &this +} + +// GetColor returns the Color field value +func (o *TemplateSummaryLabelAllOfProperties) GetColor() string { + if o == nil { + var ret string + return ret + } + + return o.Color +} + +// GetColorOk returns a tuple with the Color field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryLabelAllOfProperties) GetColorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Color, true +} + +// SetColor sets field value +func (o *TemplateSummaryLabelAllOfProperties) SetColor(v string) { + o.Color = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *TemplateSummaryLabelAllOfProperties) GetDescription() string { + if o == nil || o.Description == nil { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryLabelAllOfProperties) GetDescriptionOk() (*string, bool) { + if o == nil || o.Description == nil { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *TemplateSummaryLabelAllOfProperties) HasDescription() bool { + if o != nil && o.Description != nil { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *TemplateSummaryLabelAllOfProperties) SetDescription(v string) { + o.Description = &v +} + +func (o TemplateSummaryLabelAllOfProperties) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["color"] = o.Color + } + if o.Description != nil { + toSerialize["description"] = o.Description + } + return json.Marshal(toSerialize) +} + +type NullableTemplateSummaryLabelAllOfProperties struct { + value *TemplateSummaryLabelAllOfProperties + isSet bool +} + +func (v NullableTemplateSummaryLabelAllOfProperties) Get() *TemplateSummaryLabelAllOfProperties { + return v.value +} + +func (v *NullableTemplateSummaryLabelAllOfProperties) Set(val *TemplateSummaryLabelAllOfProperties) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateSummaryLabelAllOfProperties) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateSummaryLabelAllOfProperties) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateSummaryLabelAllOfProperties(val *TemplateSummaryLabelAllOfProperties) *NullableTemplateSummaryLabelAllOfProperties { + return &NullableTemplateSummaryLabelAllOfProperties{value: val, isSet: true} +} + +func (v NullableTemplateSummaryLabelAllOfProperties) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateSummaryLabelAllOfProperties) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/model_template_summary_label_mapping.gen.go b/api/model_template_summary_label_mapping.gen.go new file mode 100644 index 0000000..06ab57f --- /dev/null +++ b/api/model_template_summary_label_mapping.gen.go @@ -0,0 +1,309 @@ +/* + * Subset of Influx API covered by Influx CLI + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package api + +import ( + "encoding/json" +) + +// TemplateSummaryLabelMapping struct for TemplateSummaryLabelMapping +type TemplateSummaryLabelMapping struct { + Status string `json:"status"` + ResourceTemplateMetaName string `json:"resourceTemplateMetaName"` + ResourceName string `json:"resourceName"` + ResourceID string `json:"resourceID"` + ResourceType string `json:"resourceType"` + LabelTemplateMetaName string `json:"labelTemplateMetaName"` + LabelName string `json:"labelName"` + LabelID string `json:"labelID"` +} + +// NewTemplateSummaryLabelMapping instantiates a new TemplateSummaryLabelMapping object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateSummaryLabelMapping(status string, resourceTemplateMetaName string, resourceName string, resourceID string, resourceType string, labelTemplateMetaName string, labelName string, labelID string) *TemplateSummaryLabelMapping { + this := TemplateSummaryLabelMapping{} + this.Status = status + this.ResourceTemplateMetaName = resourceTemplateMetaName + this.ResourceName = resourceName + this.ResourceID = resourceID + this.ResourceType = resourceType + this.LabelTemplateMetaName = labelTemplateMetaName + this.LabelName = labelName + this.LabelID = labelID + return &this +} + +// NewTemplateSummaryLabelMappingWithDefaults instantiates a new TemplateSummaryLabelMapping object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateSummaryLabelMappingWithDefaults() *TemplateSummaryLabelMapping { + this := TemplateSummaryLabelMapping{} + return &this +} + +// GetStatus returns the Status field value +func (o *TemplateSummaryLabelMapping) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryLabelMapping) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *TemplateSummaryLabelMapping) SetStatus(v string) { + o.Status = v +} + +// GetResourceTemplateMetaName returns the ResourceTemplateMetaName field value +func (o *TemplateSummaryLabelMapping) GetResourceTemplateMetaName() string { + if o == nil { + var ret string + return ret + } + + return o.ResourceTemplateMetaName +} + +// GetResourceTemplateMetaNameOk returns a tuple with the ResourceTemplateMetaName field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryLabelMapping) GetResourceTemplateMetaNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ResourceTemplateMetaName, true +} + +// SetResourceTemplateMetaName sets field value +func (o *TemplateSummaryLabelMapping) SetResourceTemplateMetaName(v string) { + o.ResourceTemplateMetaName = v +} + +// GetResourceName returns the ResourceName field value +func (o *TemplateSummaryLabelMapping) GetResourceName() string { + if o == nil { + var ret string + return ret + } + + return o.ResourceName +} + +// GetResourceNameOk returns a tuple with the ResourceName field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryLabelMapping) GetResourceNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ResourceName, true +} + +// SetResourceName sets field value +func (o *TemplateSummaryLabelMapping) SetResourceName(v string) { + o.ResourceName = v +} + +// GetResourceID returns the ResourceID field value +func (o *TemplateSummaryLabelMapping) GetResourceID() string { + if o == nil { + var ret string + return ret + } + + return o.ResourceID +} + +// GetResourceIDOk returns a tuple with the ResourceID field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryLabelMapping) GetResourceIDOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ResourceID, true +} + +// SetResourceID sets field value +func (o *TemplateSummaryLabelMapping) SetResourceID(v string) { + o.ResourceID = v +} + +// GetResourceType returns the ResourceType field value +func (o *TemplateSummaryLabelMapping) GetResourceType() string { + if o == nil { + var ret string + return ret + } + + return o.ResourceType +} + +// GetResourceTypeOk returns a tuple with the ResourceType field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryLabelMapping) GetResourceTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ResourceType, true +} + +// SetResourceType sets field value +func (o *TemplateSummaryLabelMapping) SetResourceType(v string) { + o.ResourceType = v +} + +// GetLabelTemplateMetaName returns the LabelTemplateMetaName field value +func (o *TemplateSummaryLabelMapping) GetLabelTemplateMetaName() string { + if o == nil { + var ret string + return ret + } + + return o.LabelTemplateMetaName +} + +// GetLabelTemplateMetaNameOk returns a tuple with the LabelTemplateMetaName field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryLabelMapping) GetLabelTemplateMetaNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LabelTemplateMetaName, true +} + +// SetLabelTemplateMetaName sets field value +func (o *TemplateSummaryLabelMapping) SetLabelTemplateMetaName(v string) { + o.LabelTemplateMetaName = v +} + +// GetLabelName returns the LabelName field value +func (o *TemplateSummaryLabelMapping) GetLabelName() string { + if o == nil { + var ret string + return ret + } + + return o.LabelName +} + +// GetLabelNameOk returns a tuple with the LabelName field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryLabelMapping) GetLabelNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LabelName, true +} + +// SetLabelName sets field value +func (o *TemplateSummaryLabelMapping) SetLabelName(v string) { + o.LabelName = v +} + +// GetLabelID returns the LabelID field value +func (o *TemplateSummaryLabelMapping) GetLabelID() string { + if o == nil { + var ret string + return ret + } + + return o.LabelID +} + +// GetLabelIDOk returns a tuple with the LabelID field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryLabelMapping) GetLabelIDOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LabelID, true +} + +// SetLabelID sets field value +func (o *TemplateSummaryLabelMapping) SetLabelID(v string) { + o.LabelID = v +} + +func (o TemplateSummaryLabelMapping) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["status"] = o.Status + } + if true { + toSerialize["resourceTemplateMetaName"] = o.ResourceTemplateMetaName + } + if true { + toSerialize["resourceName"] = o.ResourceName + } + if true { + toSerialize["resourceID"] = o.ResourceID + } + if true { + toSerialize["resourceType"] = o.ResourceType + } + if true { + toSerialize["labelTemplateMetaName"] = o.LabelTemplateMetaName + } + if true { + toSerialize["labelName"] = o.LabelName + } + if true { + toSerialize["labelID"] = o.LabelID + } + return json.Marshal(toSerialize) +} + +type NullableTemplateSummaryLabelMapping struct { + value *TemplateSummaryLabelMapping + isSet bool +} + +func (v NullableTemplateSummaryLabelMapping) Get() *TemplateSummaryLabelMapping { + return v.value +} + +func (v *NullableTemplateSummaryLabelMapping) Set(val *TemplateSummaryLabelMapping) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateSummaryLabelMapping) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateSummaryLabelMapping) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateSummaryLabelMapping(val *TemplateSummaryLabelMapping) *NullableTemplateSummaryLabelMapping { + return &NullableTemplateSummaryLabelMapping{value: val, isSet: true} +} + +func (v NullableTemplateSummaryLabelMapping) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateSummaryLabelMapping) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/model_template_summary_notification_endpoint.gen.go b/api/model_template_summary_notification_endpoint.gen.go new file mode 100644 index 0000000..8c15c1a --- /dev/null +++ b/api/model_template_summary_notification_endpoint.gen.go @@ -0,0 +1,323 @@ +/* + * Subset of Influx API covered by Influx CLI + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package api + +import ( + "encoding/json" +) + +// TemplateSummaryNotificationEndpoint struct for TemplateSummaryNotificationEndpoint +type TemplateSummaryNotificationEndpoint struct { + Kind string `json:"kind"` + TemplateMetaName *string `json:"templateMetaName,omitempty"` + EnvReferences []TemplateEnvReference `json:"envReferences"` + LabelAssociations []TemplateSummaryLabel `json:"labelAssociations"` + Id string `json:"id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Status string `json:"status"` +} + +// NewTemplateSummaryNotificationEndpoint instantiates a new TemplateSummaryNotificationEndpoint object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateSummaryNotificationEndpoint(kind string, envReferences []TemplateEnvReference, labelAssociations []TemplateSummaryLabel, id string, name string, status string) *TemplateSummaryNotificationEndpoint { + this := TemplateSummaryNotificationEndpoint{} + this.Kind = kind + this.EnvReferences = envReferences + this.LabelAssociations = labelAssociations + this.Id = id + this.Name = name + this.Status = status + return &this +} + +// NewTemplateSummaryNotificationEndpointWithDefaults instantiates a new TemplateSummaryNotificationEndpoint object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateSummaryNotificationEndpointWithDefaults() *TemplateSummaryNotificationEndpoint { + this := TemplateSummaryNotificationEndpoint{} + return &this +} + +// GetKind returns the Kind field value +func (o *TemplateSummaryNotificationEndpoint) GetKind() string { + if o == nil { + var ret string + return ret + } + + return o.Kind +} + +// GetKindOk returns a tuple with the Kind field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryNotificationEndpoint) GetKindOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Kind, true +} + +// SetKind sets field value +func (o *TemplateSummaryNotificationEndpoint) SetKind(v string) { + o.Kind = v +} + +// GetTemplateMetaName returns the TemplateMetaName field value if set, zero value otherwise. +func (o *TemplateSummaryNotificationEndpoint) GetTemplateMetaName() string { + if o == nil || o.TemplateMetaName == nil { + var ret string + return ret + } + return *o.TemplateMetaName +} + +// GetTemplateMetaNameOk returns a tuple with the TemplateMetaName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryNotificationEndpoint) GetTemplateMetaNameOk() (*string, bool) { + if o == nil || o.TemplateMetaName == nil { + return nil, false + } + return o.TemplateMetaName, true +} + +// HasTemplateMetaName returns a boolean if a field has been set. +func (o *TemplateSummaryNotificationEndpoint) HasTemplateMetaName() bool { + if o != nil && o.TemplateMetaName != nil { + return true + } + + return false +} + +// SetTemplateMetaName gets a reference to the given string and assigns it to the TemplateMetaName field. +func (o *TemplateSummaryNotificationEndpoint) SetTemplateMetaName(v string) { + o.TemplateMetaName = &v +} + +// GetEnvReferences returns the EnvReferences field value +func (o *TemplateSummaryNotificationEndpoint) GetEnvReferences() []TemplateEnvReference { + if o == nil { + var ret []TemplateEnvReference + return ret + } + + return o.EnvReferences +} + +// GetEnvReferencesOk returns a tuple with the EnvReferences field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryNotificationEndpoint) GetEnvReferencesOk() (*[]TemplateEnvReference, bool) { + if o == nil { + return nil, false + } + return &o.EnvReferences, true +} + +// SetEnvReferences sets field value +func (o *TemplateSummaryNotificationEndpoint) SetEnvReferences(v []TemplateEnvReference) { + o.EnvReferences = v +} + +// GetLabelAssociations returns the LabelAssociations field value +func (o *TemplateSummaryNotificationEndpoint) GetLabelAssociations() []TemplateSummaryLabel { + if o == nil { + var ret []TemplateSummaryLabel + return ret + } + + return o.LabelAssociations +} + +// GetLabelAssociationsOk returns a tuple with the LabelAssociations field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryNotificationEndpoint) GetLabelAssociationsOk() (*[]TemplateSummaryLabel, bool) { + if o == nil { + return nil, false + } + return &o.LabelAssociations, true +} + +// SetLabelAssociations sets field value +func (o *TemplateSummaryNotificationEndpoint) SetLabelAssociations(v []TemplateSummaryLabel) { + o.LabelAssociations = v +} + +// GetId returns the Id field value +func (o *TemplateSummaryNotificationEndpoint) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryNotificationEndpoint) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *TemplateSummaryNotificationEndpoint) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *TemplateSummaryNotificationEndpoint) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryNotificationEndpoint) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *TemplateSummaryNotificationEndpoint) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *TemplateSummaryNotificationEndpoint) GetDescription() string { + if o == nil || o.Description == nil { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryNotificationEndpoint) GetDescriptionOk() (*string, bool) { + if o == nil || o.Description == nil { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *TemplateSummaryNotificationEndpoint) HasDescription() bool { + if o != nil && o.Description != nil { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *TemplateSummaryNotificationEndpoint) SetDescription(v string) { + o.Description = &v +} + +// GetStatus returns the Status field value +func (o *TemplateSummaryNotificationEndpoint) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryNotificationEndpoint) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *TemplateSummaryNotificationEndpoint) SetStatus(v string) { + o.Status = v +} + +func (o TemplateSummaryNotificationEndpoint) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["kind"] = o.Kind + } + if o.TemplateMetaName != nil { + toSerialize["templateMetaName"] = o.TemplateMetaName + } + if true { + toSerialize["envReferences"] = o.EnvReferences + } + if true { + toSerialize["labelAssociations"] = o.LabelAssociations + } + if true { + toSerialize["id"] = o.Id + } + if true { + toSerialize["name"] = o.Name + } + if o.Description != nil { + toSerialize["description"] = o.Description + } + if true { + toSerialize["status"] = o.Status + } + return json.Marshal(toSerialize) +} + +type NullableTemplateSummaryNotificationEndpoint struct { + value *TemplateSummaryNotificationEndpoint + isSet bool +} + +func (v NullableTemplateSummaryNotificationEndpoint) Get() *TemplateSummaryNotificationEndpoint { + return v.value +} + +func (v *NullableTemplateSummaryNotificationEndpoint) Set(val *TemplateSummaryNotificationEndpoint) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateSummaryNotificationEndpoint) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateSummaryNotificationEndpoint) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateSummaryNotificationEndpoint(val *TemplateSummaryNotificationEndpoint) *NullableTemplateSummaryNotificationEndpoint { + return &NullableTemplateSummaryNotificationEndpoint{value: val, isSet: true} +} + +func (v NullableTemplateSummaryNotificationEndpoint) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateSummaryNotificationEndpoint) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/model_template_summary_notification_endpoint_all_of.gen.go b/api/model_template_summary_notification_endpoint_all_of.gen.go new file mode 100644 index 0000000..e57630c --- /dev/null +++ b/api/model_template_summary_notification_endpoint_all_of.gen.go @@ -0,0 +1,200 @@ +/* + * Subset of Influx API covered by Influx CLI + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package api + +import ( + "encoding/json" +) + +// TemplateSummaryNotificationEndpointAllOf struct for TemplateSummaryNotificationEndpointAllOf +type TemplateSummaryNotificationEndpointAllOf struct { + Id string `json:"id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Status string `json:"status"` +} + +// NewTemplateSummaryNotificationEndpointAllOf instantiates a new TemplateSummaryNotificationEndpointAllOf object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateSummaryNotificationEndpointAllOf(id string, name string, status string) *TemplateSummaryNotificationEndpointAllOf { + this := TemplateSummaryNotificationEndpointAllOf{} + this.Id = id + this.Name = name + this.Status = status + return &this +} + +// NewTemplateSummaryNotificationEndpointAllOfWithDefaults instantiates a new TemplateSummaryNotificationEndpointAllOf object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateSummaryNotificationEndpointAllOfWithDefaults() *TemplateSummaryNotificationEndpointAllOf { + this := TemplateSummaryNotificationEndpointAllOf{} + return &this +} + +// GetId returns the Id field value +func (o *TemplateSummaryNotificationEndpointAllOf) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryNotificationEndpointAllOf) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *TemplateSummaryNotificationEndpointAllOf) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *TemplateSummaryNotificationEndpointAllOf) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryNotificationEndpointAllOf) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *TemplateSummaryNotificationEndpointAllOf) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *TemplateSummaryNotificationEndpointAllOf) GetDescription() string { + if o == nil || o.Description == nil { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryNotificationEndpointAllOf) GetDescriptionOk() (*string, bool) { + if o == nil || o.Description == nil { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *TemplateSummaryNotificationEndpointAllOf) HasDescription() bool { + if o != nil && o.Description != nil { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *TemplateSummaryNotificationEndpointAllOf) SetDescription(v string) { + o.Description = &v +} + +// GetStatus returns the Status field value +func (o *TemplateSummaryNotificationEndpointAllOf) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryNotificationEndpointAllOf) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *TemplateSummaryNotificationEndpointAllOf) SetStatus(v string) { + o.Status = v +} + +func (o TemplateSummaryNotificationEndpointAllOf) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["id"] = o.Id + } + if true { + toSerialize["name"] = o.Name + } + if o.Description != nil { + toSerialize["description"] = o.Description + } + if true { + toSerialize["status"] = o.Status + } + return json.Marshal(toSerialize) +} + +type NullableTemplateSummaryNotificationEndpointAllOf struct { + value *TemplateSummaryNotificationEndpointAllOf + isSet bool +} + +func (v NullableTemplateSummaryNotificationEndpointAllOf) Get() *TemplateSummaryNotificationEndpointAllOf { + return v.value +} + +func (v *NullableTemplateSummaryNotificationEndpointAllOf) Set(val *TemplateSummaryNotificationEndpointAllOf) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateSummaryNotificationEndpointAllOf) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateSummaryNotificationEndpointAllOf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateSummaryNotificationEndpointAllOf(val *TemplateSummaryNotificationEndpointAllOf) *NullableTemplateSummaryNotificationEndpointAllOf { + return &NullableTemplateSummaryNotificationEndpointAllOf{value: val, isSet: true} +} + +func (v NullableTemplateSummaryNotificationEndpointAllOf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateSummaryNotificationEndpointAllOf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/model_template_summary_notification_rule.gen.go b/api/model_template_summary_notification_rule.gen.go new file mode 100644 index 0000000..f57e0ae --- /dev/null +++ b/api/model_template_summary_notification_rule.gen.go @@ -0,0 +1,410 @@ +/* + * Subset of Influx API covered by Influx CLI + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package api + +import ( + "encoding/json" +) + +// TemplateSummaryNotificationRule struct for TemplateSummaryNotificationRule +type TemplateSummaryNotificationRule struct { + Kind string `json:"kind"` + TemplateMetaName *string `json:"templateMetaName,omitempty"` + EnvReferences []TemplateEnvReference `json:"envReferences"` + LabelAssociations []TemplateSummaryLabel `json:"labelAssociations"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + EndpointTemplateMetaName string `json:"endpointTemplateMetaName"` + EndpointID string `json:"endpointID"` + EndpointType string `json:"endpointType"` + Every string `json:"every"` + Offset string `json:"offset"` +} + +// NewTemplateSummaryNotificationRule instantiates a new TemplateSummaryNotificationRule object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateSummaryNotificationRule(kind string, envReferences []TemplateEnvReference, labelAssociations []TemplateSummaryLabel, name string, endpointTemplateMetaName string, endpointID string, endpointType string, every string, offset string) *TemplateSummaryNotificationRule { + this := TemplateSummaryNotificationRule{} + this.Kind = kind + this.EnvReferences = envReferences + this.LabelAssociations = labelAssociations + this.Name = name + this.EndpointTemplateMetaName = endpointTemplateMetaName + this.EndpointID = endpointID + this.EndpointType = endpointType + this.Every = every + this.Offset = offset + return &this +} + +// NewTemplateSummaryNotificationRuleWithDefaults instantiates a new TemplateSummaryNotificationRule object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateSummaryNotificationRuleWithDefaults() *TemplateSummaryNotificationRule { + this := TemplateSummaryNotificationRule{} + return &this +} + +// GetKind returns the Kind field value +func (o *TemplateSummaryNotificationRule) GetKind() string { + if o == nil { + var ret string + return ret + } + + return o.Kind +} + +// GetKindOk returns a tuple with the Kind field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryNotificationRule) GetKindOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Kind, true +} + +// SetKind sets field value +func (o *TemplateSummaryNotificationRule) SetKind(v string) { + o.Kind = v +} + +// GetTemplateMetaName returns the TemplateMetaName field value if set, zero value otherwise. +func (o *TemplateSummaryNotificationRule) GetTemplateMetaName() string { + if o == nil || o.TemplateMetaName == nil { + var ret string + return ret + } + return *o.TemplateMetaName +} + +// GetTemplateMetaNameOk returns a tuple with the TemplateMetaName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryNotificationRule) GetTemplateMetaNameOk() (*string, bool) { + if o == nil || o.TemplateMetaName == nil { + return nil, false + } + return o.TemplateMetaName, true +} + +// HasTemplateMetaName returns a boolean if a field has been set. +func (o *TemplateSummaryNotificationRule) HasTemplateMetaName() bool { + if o != nil && o.TemplateMetaName != nil { + return true + } + + return false +} + +// SetTemplateMetaName gets a reference to the given string and assigns it to the TemplateMetaName field. +func (o *TemplateSummaryNotificationRule) SetTemplateMetaName(v string) { + o.TemplateMetaName = &v +} + +// GetEnvReferences returns the EnvReferences field value +func (o *TemplateSummaryNotificationRule) GetEnvReferences() []TemplateEnvReference { + if o == nil { + var ret []TemplateEnvReference + return ret + } + + return o.EnvReferences +} + +// GetEnvReferencesOk returns a tuple with the EnvReferences field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryNotificationRule) GetEnvReferencesOk() (*[]TemplateEnvReference, bool) { + if o == nil { + return nil, false + } + return &o.EnvReferences, true +} + +// SetEnvReferences sets field value +func (o *TemplateSummaryNotificationRule) SetEnvReferences(v []TemplateEnvReference) { + o.EnvReferences = v +} + +// GetLabelAssociations returns the LabelAssociations field value +func (o *TemplateSummaryNotificationRule) GetLabelAssociations() []TemplateSummaryLabel { + if o == nil { + var ret []TemplateSummaryLabel + return ret + } + + return o.LabelAssociations +} + +// GetLabelAssociationsOk returns a tuple with the LabelAssociations field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryNotificationRule) GetLabelAssociationsOk() (*[]TemplateSummaryLabel, bool) { + if o == nil { + return nil, false + } + return &o.LabelAssociations, true +} + +// SetLabelAssociations sets field value +func (o *TemplateSummaryNotificationRule) SetLabelAssociations(v []TemplateSummaryLabel) { + o.LabelAssociations = v +} + +// GetName returns the Name field value +func (o *TemplateSummaryNotificationRule) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryNotificationRule) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *TemplateSummaryNotificationRule) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *TemplateSummaryNotificationRule) GetDescription() string { + if o == nil || o.Description == nil { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryNotificationRule) GetDescriptionOk() (*string, bool) { + if o == nil || o.Description == nil { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *TemplateSummaryNotificationRule) HasDescription() bool { + if o != nil && o.Description != nil { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *TemplateSummaryNotificationRule) SetDescription(v string) { + o.Description = &v +} + +// GetEndpointTemplateMetaName returns the EndpointTemplateMetaName field value +func (o *TemplateSummaryNotificationRule) GetEndpointTemplateMetaName() string { + if o == nil { + var ret string + return ret + } + + return o.EndpointTemplateMetaName +} + +// GetEndpointTemplateMetaNameOk returns a tuple with the EndpointTemplateMetaName field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryNotificationRule) GetEndpointTemplateMetaNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.EndpointTemplateMetaName, true +} + +// SetEndpointTemplateMetaName sets field value +func (o *TemplateSummaryNotificationRule) SetEndpointTemplateMetaName(v string) { + o.EndpointTemplateMetaName = v +} + +// GetEndpointID returns the EndpointID field value +func (o *TemplateSummaryNotificationRule) GetEndpointID() string { + if o == nil { + var ret string + return ret + } + + return o.EndpointID +} + +// GetEndpointIDOk returns a tuple with the EndpointID field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryNotificationRule) GetEndpointIDOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.EndpointID, true +} + +// SetEndpointID sets field value +func (o *TemplateSummaryNotificationRule) SetEndpointID(v string) { + o.EndpointID = v +} + +// GetEndpointType returns the EndpointType field value +func (o *TemplateSummaryNotificationRule) GetEndpointType() string { + if o == nil { + var ret string + return ret + } + + return o.EndpointType +} + +// GetEndpointTypeOk returns a tuple with the EndpointType field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryNotificationRule) GetEndpointTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.EndpointType, true +} + +// SetEndpointType sets field value +func (o *TemplateSummaryNotificationRule) SetEndpointType(v string) { + o.EndpointType = v +} + +// GetEvery returns the Every field value +func (o *TemplateSummaryNotificationRule) GetEvery() string { + if o == nil { + var ret string + return ret + } + + return o.Every +} + +// GetEveryOk returns a tuple with the Every field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryNotificationRule) GetEveryOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Every, true +} + +// SetEvery sets field value +func (o *TemplateSummaryNotificationRule) SetEvery(v string) { + o.Every = v +} + +// GetOffset returns the Offset field value +func (o *TemplateSummaryNotificationRule) GetOffset() string { + if o == nil { + var ret string + return ret + } + + return o.Offset +} + +// GetOffsetOk returns a tuple with the Offset field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryNotificationRule) GetOffsetOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Offset, true +} + +// SetOffset sets field value +func (o *TemplateSummaryNotificationRule) SetOffset(v string) { + o.Offset = v +} + +func (o TemplateSummaryNotificationRule) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["kind"] = o.Kind + } + if o.TemplateMetaName != nil { + toSerialize["templateMetaName"] = o.TemplateMetaName + } + if true { + toSerialize["envReferences"] = o.EnvReferences + } + if true { + toSerialize["labelAssociations"] = o.LabelAssociations + } + if true { + toSerialize["name"] = o.Name + } + if o.Description != nil { + toSerialize["description"] = o.Description + } + if true { + toSerialize["endpointTemplateMetaName"] = o.EndpointTemplateMetaName + } + if true { + toSerialize["endpointID"] = o.EndpointID + } + if true { + toSerialize["endpointType"] = o.EndpointType + } + if true { + toSerialize["every"] = o.Every + } + if true { + toSerialize["offset"] = o.Offset + } + return json.Marshal(toSerialize) +} + +type NullableTemplateSummaryNotificationRule struct { + value *TemplateSummaryNotificationRule + isSet bool +} + +func (v NullableTemplateSummaryNotificationRule) Get() *TemplateSummaryNotificationRule { + return v.value +} + +func (v *NullableTemplateSummaryNotificationRule) Set(val *TemplateSummaryNotificationRule) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateSummaryNotificationRule) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateSummaryNotificationRule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateSummaryNotificationRule(val *TemplateSummaryNotificationRule) *NullableTemplateSummaryNotificationRule { + return &NullableTemplateSummaryNotificationRule{value: val, isSet: true} +} + +func (v NullableTemplateSummaryNotificationRule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateSummaryNotificationRule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/model_template_summary_notification_rule_all_of.gen.go b/api/model_template_summary_notification_rule_all_of.gen.go new file mode 100644 index 0000000..e623085 --- /dev/null +++ b/api/model_template_summary_notification_rule_all_of.gen.go @@ -0,0 +1,287 @@ +/* + * Subset of Influx API covered by Influx CLI + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package api + +import ( + "encoding/json" +) + +// TemplateSummaryNotificationRuleAllOf struct for TemplateSummaryNotificationRuleAllOf +type TemplateSummaryNotificationRuleAllOf struct { + Name string `json:"name"` + Description *string `json:"description,omitempty"` + EndpointTemplateMetaName string `json:"endpointTemplateMetaName"` + EndpointID string `json:"endpointID"` + EndpointType string `json:"endpointType"` + Every string `json:"every"` + Offset string `json:"offset"` +} + +// NewTemplateSummaryNotificationRuleAllOf instantiates a new TemplateSummaryNotificationRuleAllOf object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateSummaryNotificationRuleAllOf(name string, endpointTemplateMetaName string, endpointID string, endpointType string, every string, offset string) *TemplateSummaryNotificationRuleAllOf { + this := TemplateSummaryNotificationRuleAllOf{} + this.Name = name + this.EndpointTemplateMetaName = endpointTemplateMetaName + this.EndpointID = endpointID + this.EndpointType = endpointType + this.Every = every + this.Offset = offset + return &this +} + +// NewTemplateSummaryNotificationRuleAllOfWithDefaults instantiates a new TemplateSummaryNotificationRuleAllOf object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateSummaryNotificationRuleAllOfWithDefaults() *TemplateSummaryNotificationRuleAllOf { + this := TemplateSummaryNotificationRuleAllOf{} + return &this +} + +// GetName returns the Name field value +func (o *TemplateSummaryNotificationRuleAllOf) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryNotificationRuleAllOf) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *TemplateSummaryNotificationRuleAllOf) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *TemplateSummaryNotificationRuleAllOf) GetDescription() string { + if o == nil || o.Description == nil { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryNotificationRuleAllOf) GetDescriptionOk() (*string, bool) { + if o == nil || o.Description == nil { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *TemplateSummaryNotificationRuleAllOf) HasDescription() bool { + if o != nil && o.Description != nil { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *TemplateSummaryNotificationRuleAllOf) SetDescription(v string) { + o.Description = &v +} + +// GetEndpointTemplateMetaName returns the EndpointTemplateMetaName field value +func (o *TemplateSummaryNotificationRuleAllOf) GetEndpointTemplateMetaName() string { + if o == nil { + var ret string + return ret + } + + return o.EndpointTemplateMetaName +} + +// GetEndpointTemplateMetaNameOk returns a tuple with the EndpointTemplateMetaName field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryNotificationRuleAllOf) GetEndpointTemplateMetaNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.EndpointTemplateMetaName, true +} + +// SetEndpointTemplateMetaName sets field value +func (o *TemplateSummaryNotificationRuleAllOf) SetEndpointTemplateMetaName(v string) { + o.EndpointTemplateMetaName = v +} + +// GetEndpointID returns the EndpointID field value +func (o *TemplateSummaryNotificationRuleAllOf) GetEndpointID() string { + if o == nil { + var ret string + return ret + } + + return o.EndpointID +} + +// GetEndpointIDOk returns a tuple with the EndpointID field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryNotificationRuleAllOf) GetEndpointIDOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.EndpointID, true +} + +// SetEndpointID sets field value +func (o *TemplateSummaryNotificationRuleAllOf) SetEndpointID(v string) { + o.EndpointID = v +} + +// GetEndpointType returns the EndpointType field value +func (o *TemplateSummaryNotificationRuleAllOf) GetEndpointType() string { + if o == nil { + var ret string + return ret + } + + return o.EndpointType +} + +// GetEndpointTypeOk returns a tuple with the EndpointType field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryNotificationRuleAllOf) GetEndpointTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.EndpointType, true +} + +// SetEndpointType sets field value +func (o *TemplateSummaryNotificationRuleAllOf) SetEndpointType(v string) { + o.EndpointType = v +} + +// GetEvery returns the Every field value +func (o *TemplateSummaryNotificationRuleAllOf) GetEvery() string { + if o == nil { + var ret string + return ret + } + + return o.Every +} + +// GetEveryOk returns a tuple with the Every field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryNotificationRuleAllOf) GetEveryOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Every, true +} + +// SetEvery sets field value +func (o *TemplateSummaryNotificationRuleAllOf) SetEvery(v string) { + o.Every = v +} + +// GetOffset returns the Offset field value +func (o *TemplateSummaryNotificationRuleAllOf) GetOffset() string { + if o == nil { + var ret string + return ret + } + + return o.Offset +} + +// GetOffsetOk returns a tuple with the Offset field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryNotificationRuleAllOf) GetOffsetOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Offset, true +} + +// SetOffset sets field value +func (o *TemplateSummaryNotificationRuleAllOf) SetOffset(v string) { + o.Offset = v +} + +func (o TemplateSummaryNotificationRuleAllOf) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["name"] = o.Name + } + if o.Description != nil { + toSerialize["description"] = o.Description + } + if true { + toSerialize["endpointTemplateMetaName"] = o.EndpointTemplateMetaName + } + if true { + toSerialize["endpointID"] = o.EndpointID + } + if true { + toSerialize["endpointType"] = o.EndpointType + } + if true { + toSerialize["every"] = o.Every + } + if true { + toSerialize["offset"] = o.Offset + } + return json.Marshal(toSerialize) +} + +type NullableTemplateSummaryNotificationRuleAllOf struct { + value *TemplateSummaryNotificationRuleAllOf + isSet bool +} + +func (v NullableTemplateSummaryNotificationRuleAllOf) Get() *TemplateSummaryNotificationRuleAllOf { + return v.value +} + +func (v *NullableTemplateSummaryNotificationRuleAllOf) Set(val *TemplateSummaryNotificationRuleAllOf) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateSummaryNotificationRuleAllOf) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateSummaryNotificationRuleAllOf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateSummaryNotificationRuleAllOf(val *TemplateSummaryNotificationRuleAllOf) *NullableTemplateSummaryNotificationRuleAllOf { + return &NullableTemplateSummaryNotificationRuleAllOf{value: val, isSet: true} +} + +func (v NullableTemplateSummaryNotificationRuleAllOf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateSummaryNotificationRuleAllOf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/model_template_summary_resources.gen.go b/api/model_template_summary_resources.gen.go new file mode 100644 index 0000000..010f73e --- /dev/null +++ b/api/model_template_summary_resources.gen.go @@ -0,0 +1,425 @@ +/* + * Subset of Influx API covered by Influx CLI + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package api + +import ( + "encoding/json" +) + +// TemplateSummaryResources struct for TemplateSummaryResources +type TemplateSummaryResources struct { + Buckets []TemplateSummaryBucket `json:"buckets"` + Checks []TemplateSummaryCheck `json:"checks"` + Dashboards []TemplateSummaryDashboard `json:"dashboards"` + Labels []TemplateSummaryLabel `json:"labels"` + LabelMappings []TemplateSummaryLabelMapping `json:"labelMappings"` + MissingEnvRefs []string `json:"missingEnvRefs"` + MissingSecrets []string `json:"missingSecrets"` + NotificationEndpoints []TemplateSummaryNotificationEndpoint `json:"notificationEndpoints"` + NotificationRules []TemplateSummaryNotificationRule `json:"notificationRules"` + Tasks []TemplateSummaryTask `json:"tasks"` + TelegrafConfigs []TemplateSummaryTelegraf `json:"telegrafConfigs"` + Variables []TemplateSummaryVariable `json:"variables"` +} + +// NewTemplateSummaryResources instantiates a new TemplateSummaryResources object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateSummaryResources(buckets []TemplateSummaryBucket, checks []TemplateSummaryCheck, dashboards []TemplateSummaryDashboard, labels []TemplateSummaryLabel, labelMappings []TemplateSummaryLabelMapping, missingEnvRefs []string, missingSecrets []string, notificationEndpoints []TemplateSummaryNotificationEndpoint, notificationRules []TemplateSummaryNotificationRule, tasks []TemplateSummaryTask, telegrafConfigs []TemplateSummaryTelegraf, variables []TemplateSummaryVariable) *TemplateSummaryResources { + this := TemplateSummaryResources{} + this.Buckets = buckets + this.Checks = checks + this.Dashboards = dashboards + this.Labels = labels + this.LabelMappings = labelMappings + this.MissingEnvRefs = missingEnvRefs + this.MissingSecrets = missingSecrets + this.NotificationEndpoints = notificationEndpoints + this.NotificationRules = notificationRules + this.Tasks = tasks + this.TelegrafConfigs = telegrafConfigs + this.Variables = variables + return &this +} + +// NewTemplateSummaryResourcesWithDefaults instantiates a new TemplateSummaryResources object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateSummaryResourcesWithDefaults() *TemplateSummaryResources { + this := TemplateSummaryResources{} + return &this +} + +// GetBuckets returns the Buckets field value +func (o *TemplateSummaryResources) GetBuckets() []TemplateSummaryBucket { + if o == nil { + var ret []TemplateSummaryBucket + return ret + } + + return o.Buckets +} + +// GetBucketsOk returns a tuple with the Buckets field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryResources) GetBucketsOk() (*[]TemplateSummaryBucket, bool) { + if o == nil { + return nil, false + } + return &o.Buckets, true +} + +// SetBuckets sets field value +func (o *TemplateSummaryResources) SetBuckets(v []TemplateSummaryBucket) { + o.Buckets = v +} + +// GetChecks returns the Checks field value +func (o *TemplateSummaryResources) GetChecks() []TemplateSummaryCheck { + if o == nil { + var ret []TemplateSummaryCheck + return ret + } + + return o.Checks +} + +// GetChecksOk returns a tuple with the Checks field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryResources) GetChecksOk() (*[]TemplateSummaryCheck, bool) { + if o == nil { + return nil, false + } + return &o.Checks, true +} + +// SetChecks sets field value +func (o *TemplateSummaryResources) SetChecks(v []TemplateSummaryCheck) { + o.Checks = v +} + +// GetDashboards returns the Dashboards field value +func (o *TemplateSummaryResources) GetDashboards() []TemplateSummaryDashboard { + if o == nil { + var ret []TemplateSummaryDashboard + return ret + } + + return o.Dashboards +} + +// GetDashboardsOk returns a tuple with the Dashboards field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryResources) GetDashboardsOk() (*[]TemplateSummaryDashboard, bool) { + if o == nil { + return nil, false + } + return &o.Dashboards, true +} + +// SetDashboards sets field value +func (o *TemplateSummaryResources) SetDashboards(v []TemplateSummaryDashboard) { + o.Dashboards = v +} + +// GetLabels returns the Labels field value +func (o *TemplateSummaryResources) GetLabels() []TemplateSummaryLabel { + if o == nil { + var ret []TemplateSummaryLabel + return ret + } + + return o.Labels +} + +// GetLabelsOk returns a tuple with the Labels field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryResources) GetLabelsOk() (*[]TemplateSummaryLabel, bool) { + if o == nil { + return nil, false + } + return &o.Labels, true +} + +// SetLabels sets field value +func (o *TemplateSummaryResources) SetLabels(v []TemplateSummaryLabel) { + o.Labels = v +} + +// GetLabelMappings returns the LabelMappings field value +func (o *TemplateSummaryResources) GetLabelMappings() []TemplateSummaryLabelMapping { + if o == nil { + var ret []TemplateSummaryLabelMapping + return ret + } + + return o.LabelMappings +} + +// GetLabelMappingsOk returns a tuple with the LabelMappings field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryResources) GetLabelMappingsOk() (*[]TemplateSummaryLabelMapping, bool) { + if o == nil { + return nil, false + } + return &o.LabelMappings, true +} + +// SetLabelMappings sets field value +func (o *TemplateSummaryResources) SetLabelMappings(v []TemplateSummaryLabelMapping) { + o.LabelMappings = v +} + +// GetMissingEnvRefs returns the MissingEnvRefs field value +func (o *TemplateSummaryResources) GetMissingEnvRefs() []string { + if o == nil { + var ret []string + return ret + } + + return o.MissingEnvRefs +} + +// GetMissingEnvRefsOk returns a tuple with the MissingEnvRefs field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryResources) GetMissingEnvRefsOk() (*[]string, bool) { + if o == nil { + return nil, false + } + return &o.MissingEnvRefs, true +} + +// SetMissingEnvRefs sets field value +func (o *TemplateSummaryResources) SetMissingEnvRefs(v []string) { + o.MissingEnvRefs = v +} + +// GetMissingSecrets returns the MissingSecrets field value +func (o *TemplateSummaryResources) GetMissingSecrets() []string { + if o == nil { + var ret []string + return ret + } + + return o.MissingSecrets +} + +// GetMissingSecretsOk returns a tuple with the MissingSecrets field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryResources) GetMissingSecretsOk() (*[]string, bool) { + if o == nil { + return nil, false + } + return &o.MissingSecrets, true +} + +// SetMissingSecrets sets field value +func (o *TemplateSummaryResources) SetMissingSecrets(v []string) { + o.MissingSecrets = v +} + +// GetNotificationEndpoints returns the NotificationEndpoints field value +func (o *TemplateSummaryResources) GetNotificationEndpoints() []TemplateSummaryNotificationEndpoint { + if o == nil { + var ret []TemplateSummaryNotificationEndpoint + return ret + } + + return o.NotificationEndpoints +} + +// GetNotificationEndpointsOk returns a tuple with the NotificationEndpoints field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryResources) GetNotificationEndpointsOk() (*[]TemplateSummaryNotificationEndpoint, bool) { + if o == nil { + return nil, false + } + return &o.NotificationEndpoints, true +} + +// SetNotificationEndpoints sets field value +func (o *TemplateSummaryResources) SetNotificationEndpoints(v []TemplateSummaryNotificationEndpoint) { + o.NotificationEndpoints = v +} + +// GetNotificationRules returns the NotificationRules field value +func (o *TemplateSummaryResources) GetNotificationRules() []TemplateSummaryNotificationRule { + if o == nil { + var ret []TemplateSummaryNotificationRule + return ret + } + + return o.NotificationRules +} + +// GetNotificationRulesOk returns a tuple with the NotificationRules field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryResources) GetNotificationRulesOk() (*[]TemplateSummaryNotificationRule, bool) { + if o == nil { + return nil, false + } + return &o.NotificationRules, true +} + +// SetNotificationRules sets field value +func (o *TemplateSummaryResources) SetNotificationRules(v []TemplateSummaryNotificationRule) { + o.NotificationRules = v +} + +// GetTasks returns the Tasks field value +func (o *TemplateSummaryResources) GetTasks() []TemplateSummaryTask { + if o == nil { + var ret []TemplateSummaryTask + return ret + } + + return o.Tasks +} + +// GetTasksOk returns a tuple with the Tasks field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryResources) GetTasksOk() (*[]TemplateSummaryTask, bool) { + if o == nil { + return nil, false + } + return &o.Tasks, true +} + +// SetTasks sets field value +func (o *TemplateSummaryResources) SetTasks(v []TemplateSummaryTask) { + o.Tasks = v +} + +// GetTelegrafConfigs returns the TelegrafConfigs field value +func (o *TemplateSummaryResources) GetTelegrafConfigs() []TemplateSummaryTelegraf { + if o == nil { + var ret []TemplateSummaryTelegraf + return ret + } + + return o.TelegrafConfigs +} + +// GetTelegrafConfigsOk returns a tuple with the TelegrafConfigs field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryResources) GetTelegrafConfigsOk() (*[]TemplateSummaryTelegraf, bool) { + if o == nil { + return nil, false + } + return &o.TelegrafConfigs, true +} + +// SetTelegrafConfigs sets field value +func (o *TemplateSummaryResources) SetTelegrafConfigs(v []TemplateSummaryTelegraf) { + o.TelegrafConfigs = v +} + +// GetVariables returns the Variables field value +func (o *TemplateSummaryResources) GetVariables() []TemplateSummaryVariable { + if o == nil { + var ret []TemplateSummaryVariable + return ret + } + + return o.Variables +} + +// GetVariablesOk returns a tuple with the Variables field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryResources) GetVariablesOk() (*[]TemplateSummaryVariable, bool) { + if o == nil { + return nil, false + } + return &o.Variables, true +} + +// SetVariables sets field value +func (o *TemplateSummaryResources) SetVariables(v []TemplateSummaryVariable) { + o.Variables = v +} + +func (o TemplateSummaryResources) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["buckets"] = o.Buckets + } + if true { + toSerialize["checks"] = o.Checks + } + if true { + toSerialize["dashboards"] = o.Dashboards + } + if true { + toSerialize["labels"] = o.Labels + } + if true { + toSerialize["labelMappings"] = o.LabelMappings + } + if true { + toSerialize["missingEnvRefs"] = o.MissingEnvRefs + } + if true { + toSerialize["missingSecrets"] = o.MissingSecrets + } + if true { + toSerialize["notificationEndpoints"] = o.NotificationEndpoints + } + if true { + toSerialize["notificationRules"] = o.NotificationRules + } + if true { + toSerialize["tasks"] = o.Tasks + } + if true { + toSerialize["telegrafConfigs"] = o.TelegrafConfigs + } + if true { + toSerialize["variables"] = o.Variables + } + return json.Marshal(toSerialize) +} + +type NullableTemplateSummaryResources struct { + value *TemplateSummaryResources + isSet bool +} + +func (v NullableTemplateSummaryResources) Get() *TemplateSummaryResources { + return v.value +} + +func (v *NullableTemplateSummaryResources) Set(val *TemplateSummaryResources) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateSummaryResources) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateSummaryResources) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateSummaryResources(val *TemplateSummaryResources) *NullableTemplateSummaryResources { + return &NullableTemplateSummaryResources{value: val, isSet: true} +} + +func (v NullableTemplateSummaryResources) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateSummaryResources) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/model_template_summary_task.gen.go b/api/model_template_summary_task.gen.go new file mode 100644 index 0000000..2d3b393 --- /dev/null +++ b/api/model_template_summary_task.gen.go @@ -0,0 +1,402 @@ +/* + * Subset of Influx API covered by Influx CLI + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package api + +import ( + "encoding/json" +) + +// TemplateSummaryTask struct for TemplateSummaryTask +type TemplateSummaryTask struct { + Kind string `json:"kind"` + TemplateMetaName *string `json:"templateMetaName,omitempty"` + EnvReferences []TemplateEnvReference `json:"envReferences"` + LabelAssociations []TemplateSummaryLabel `json:"labelAssociations"` + Id string `json:"id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Cron *string `json:"cron,omitempty"` + Every *string `json:"every,omitempty"` + Offset *string `json:"offset,omitempty"` +} + +// NewTemplateSummaryTask instantiates a new TemplateSummaryTask object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateSummaryTask(kind string, envReferences []TemplateEnvReference, labelAssociations []TemplateSummaryLabel, id string, name string) *TemplateSummaryTask { + this := TemplateSummaryTask{} + this.Kind = kind + this.EnvReferences = envReferences + this.LabelAssociations = labelAssociations + this.Id = id + this.Name = name + return &this +} + +// NewTemplateSummaryTaskWithDefaults instantiates a new TemplateSummaryTask object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateSummaryTaskWithDefaults() *TemplateSummaryTask { + this := TemplateSummaryTask{} + return &this +} + +// GetKind returns the Kind field value +func (o *TemplateSummaryTask) GetKind() string { + if o == nil { + var ret string + return ret + } + + return o.Kind +} + +// GetKindOk returns a tuple with the Kind field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryTask) GetKindOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Kind, true +} + +// SetKind sets field value +func (o *TemplateSummaryTask) SetKind(v string) { + o.Kind = v +} + +// GetTemplateMetaName returns the TemplateMetaName field value if set, zero value otherwise. +func (o *TemplateSummaryTask) GetTemplateMetaName() string { + if o == nil || o.TemplateMetaName == nil { + var ret string + return ret + } + return *o.TemplateMetaName +} + +// GetTemplateMetaNameOk returns a tuple with the TemplateMetaName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryTask) GetTemplateMetaNameOk() (*string, bool) { + if o == nil || o.TemplateMetaName == nil { + return nil, false + } + return o.TemplateMetaName, true +} + +// HasTemplateMetaName returns a boolean if a field has been set. +func (o *TemplateSummaryTask) HasTemplateMetaName() bool { + if o != nil && o.TemplateMetaName != nil { + return true + } + + return false +} + +// SetTemplateMetaName gets a reference to the given string and assigns it to the TemplateMetaName field. +func (o *TemplateSummaryTask) SetTemplateMetaName(v string) { + o.TemplateMetaName = &v +} + +// GetEnvReferences returns the EnvReferences field value +func (o *TemplateSummaryTask) GetEnvReferences() []TemplateEnvReference { + if o == nil { + var ret []TemplateEnvReference + return ret + } + + return o.EnvReferences +} + +// GetEnvReferencesOk returns a tuple with the EnvReferences field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryTask) GetEnvReferencesOk() (*[]TemplateEnvReference, bool) { + if o == nil { + return nil, false + } + return &o.EnvReferences, true +} + +// SetEnvReferences sets field value +func (o *TemplateSummaryTask) SetEnvReferences(v []TemplateEnvReference) { + o.EnvReferences = v +} + +// GetLabelAssociations returns the LabelAssociations field value +func (o *TemplateSummaryTask) GetLabelAssociations() []TemplateSummaryLabel { + if o == nil { + var ret []TemplateSummaryLabel + return ret + } + + return o.LabelAssociations +} + +// GetLabelAssociationsOk returns a tuple with the LabelAssociations field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryTask) GetLabelAssociationsOk() (*[]TemplateSummaryLabel, bool) { + if o == nil { + return nil, false + } + return &o.LabelAssociations, true +} + +// SetLabelAssociations sets field value +func (o *TemplateSummaryTask) SetLabelAssociations(v []TemplateSummaryLabel) { + o.LabelAssociations = v +} + +// GetId returns the Id field value +func (o *TemplateSummaryTask) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryTask) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *TemplateSummaryTask) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *TemplateSummaryTask) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryTask) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *TemplateSummaryTask) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *TemplateSummaryTask) GetDescription() string { + if o == nil || o.Description == nil { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryTask) GetDescriptionOk() (*string, bool) { + if o == nil || o.Description == nil { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *TemplateSummaryTask) HasDescription() bool { + if o != nil && o.Description != nil { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *TemplateSummaryTask) SetDescription(v string) { + o.Description = &v +} + +// GetCron returns the Cron field value if set, zero value otherwise. +func (o *TemplateSummaryTask) GetCron() string { + if o == nil || o.Cron == nil { + var ret string + return ret + } + return *o.Cron +} + +// GetCronOk returns a tuple with the Cron field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryTask) GetCronOk() (*string, bool) { + if o == nil || o.Cron == nil { + return nil, false + } + return o.Cron, true +} + +// HasCron returns a boolean if a field has been set. +func (o *TemplateSummaryTask) HasCron() bool { + if o != nil && o.Cron != nil { + return true + } + + return false +} + +// SetCron gets a reference to the given string and assigns it to the Cron field. +func (o *TemplateSummaryTask) SetCron(v string) { + o.Cron = &v +} + +// GetEvery returns the Every field value if set, zero value otherwise. +func (o *TemplateSummaryTask) GetEvery() string { + if o == nil || o.Every == nil { + var ret string + return ret + } + return *o.Every +} + +// GetEveryOk returns a tuple with the Every field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryTask) GetEveryOk() (*string, bool) { + if o == nil || o.Every == nil { + return nil, false + } + return o.Every, true +} + +// HasEvery returns a boolean if a field has been set. +func (o *TemplateSummaryTask) HasEvery() bool { + if o != nil && o.Every != nil { + return true + } + + return false +} + +// SetEvery gets a reference to the given string and assigns it to the Every field. +func (o *TemplateSummaryTask) SetEvery(v string) { + o.Every = &v +} + +// GetOffset returns the Offset field value if set, zero value otherwise. +func (o *TemplateSummaryTask) GetOffset() string { + if o == nil || o.Offset == nil { + var ret string + return ret + } + return *o.Offset +} + +// GetOffsetOk returns a tuple with the Offset field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryTask) GetOffsetOk() (*string, bool) { + if o == nil || o.Offset == nil { + return nil, false + } + return o.Offset, true +} + +// HasOffset returns a boolean if a field has been set. +func (o *TemplateSummaryTask) HasOffset() bool { + if o != nil && o.Offset != nil { + return true + } + + return false +} + +// SetOffset gets a reference to the given string and assigns it to the Offset field. +func (o *TemplateSummaryTask) SetOffset(v string) { + o.Offset = &v +} + +func (o TemplateSummaryTask) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["kind"] = o.Kind + } + if o.TemplateMetaName != nil { + toSerialize["templateMetaName"] = o.TemplateMetaName + } + if true { + toSerialize["envReferences"] = o.EnvReferences + } + if true { + toSerialize["labelAssociations"] = o.LabelAssociations + } + if true { + toSerialize["id"] = o.Id + } + if true { + toSerialize["name"] = o.Name + } + if o.Description != nil { + toSerialize["description"] = o.Description + } + if o.Cron != nil { + toSerialize["cron"] = o.Cron + } + if o.Every != nil { + toSerialize["every"] = o.Every + } + if o.Offset != nil { + toSerialize["offset"] = o.Offset + } + return json.Marshal(toSerialize) +} + +type NullableTemplateSummaryTask struct { + value *TemplateSummaryTask + isSet bool +} + +func (v NullableTemplateSummaryTask) Get() *TemplateSummaryTask { + return v.value +} + +func (v *NullableTemplateSummaryTask) Set(val *TemplateSummaryTask) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateSummaryTask) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateSummaryTask) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateSummaryTask(val *TemplateSummaryTask) *NullableTemplateSummaryTask { + return &NullableTemplateSummaryTask{value: val, isSet: true} +} + +func (v NullableTemplateSummaryTask) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateSummaryTask) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/model_template_summary_task_all_of.gen.go b/api/model_template_summary_task_all_of.gen.go new file mode 100644 index 0000000..56be4fc --- /dev/null +++ b/api/model_template_summary_task_all_of.gen.go @@ -0,0 +1,279 @@ +/* + * Subset of Influx API covered by Influx CLI + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package api + +import ( + "encoding/json" +) + +// TemplateSummaryTaskAllOf struct for TemplateSummaryTaskAllOf +type TemplateSummaryTaskAllOf struct { + Id string `json:"id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Cron *string `json:"cron,omitempty"` + Every *string `json:"every,omitempty"` + Offset *string `json:"offset,omitempty"` +} + +// NewTemplateSummaryTaskAllOf instantiates a new TemplateSummaryTaskAllOf object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateSummaryTaskAllOf(id string, name string) *TemplateSummaryTaskAllOf { + this := TemplateSummaryTaskAllOf{} + this.Id = id + this.Name = name + return &this +} + +// NewTemplateSummaryTaskAllOfWithDefaults instantiates a new TemplateSummaryTaskAllOf object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateSummaryTaskAllOfWithDefaults() *TemplateSummaryTaskAllOf { + this := TemplateSummaryTaskAllOf{} + return &this +} + +// GetId returns the Id field value +func (o *TemplateSummaryTaskAllOf) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryTaskAllOf) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *TemplateSummaryTaskAllOf) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *TemplateSummaryTaskAllOf) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryTaskAllOf) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *TemplateSummaryTaskAllOf) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *TemplateSummaryTaskAllOf) GetDescription() string { + if o == nil || o.Description == nil { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryTaskAllOf) GetDescriptionOk() (*string, bool) { + if o == nil || o.Description == nil { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *TemplateSummaryTaskAllOf) HasDescription() bool { + if o != nil && o.Description != nil { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *TemplateSummaryTaskAllOf) SetDescription(v string) { + o.Description = &v +} + +// GetCron returns the Cron field value if set, zero value otherwise. +func (o *TemplateSummaryTaskAllOf) GetCron() string { + if o == nil || o.Cron == nil { + var ret string + return ret + } + return *o.Cron +} + +// GetCronOk returns a tuple with the Cron field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryTaskAllOf) GetCronOk() (*string, bool) { + if o == nil || o.Cron == nil { + return nil, false + } + return o.Cron, true +} + +// HasCron returns a boolean if a field has been set. +func (o *TemplateSummaryTaskAllOf) HasCron() bool { + if o != nil && o.Cron != nil { + return true + } + + return false +} + +// SetCron gets a reference to the given string and assigns it to the Cron field. +func (o *TemplateSummaryTaskAllOf) SetCron(v string) { + o.Cron = &v +} + +// GetEvery returns the Every field value if set, zero value otherwise. +func (o *TemplateSummaryTaskAllOf) GetEvery() string { + if o == nil || o.Every == nil { + var ret string + return ret + } + return *o.Every +} + +// GetEveryOk returns a tuple with the Every field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryTaskAllOf) GetEveryOk() (*string, bool) { + if o == nil || o.Every == nil { + return nil, false + } + return o.Every, true +} + +// HasEvery returns a boolean if a field has been set. +func (o *TemplateSummaryTaskAllOf) HasEvery() bool { + if o != nil && o.Every != nil { + return true + } + + return false +} + +// SetEvery gets a reference to the given string and assigns it to the Every field. +func (o *TemplateSummaryTaskAllOf) SetEvery(v string) { + o.Every = &v +} + +// GetOffset returns the Offset field value if set, zero value otherwise. +func (o *TemplateSummaryTaskAllOf) GetOffset() string { + if o == nil || o.Offset == nil { + var ret string + return ret + } + return *o.Offset +} + +// GetOffsetOk returns a tuple with the Offset field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryTaskAllOf) GetOffsetOk() (*string, bool) { + if o == nil || o.Offset == nil { + return nil, false + } + return o.Offset, true +} + +// HasOffset returns a boolean if a field has been set. +func (o *TemplateSummaryTaskAllOf) HasOffset() bool { + if o != nil && o.Offset != nil { + return true + } + + return false +} + +// SetOffset gets a reference to the given string and assigns it to the Offset field. +func (o *TemplateSummaryTaskAllOf) SetOffset(v string) { + o.Offset = &v +} + +func (o TemplateSummaryTaskAllOf) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["id"] = o.Id + } + if true { + toSerialize["name"] = o.Name + } + if o.Description != nil { + toSerialize["description"] = o.Description + } + if o.Cron != nil { + toSerialize["cron"] = o.Cron + } + if o.Every != nil { + toSerialize["every"] = o.Every + } + if o.Offset != nil { + toSerialize["offset"] = o.Offset + } + return json.Marshal(toSerialize) +} + +type NullableTemplateSummaryTaskAllOf struct { + value *TemplateSummaryTaskAllOf + isSet bool +} + +func (v NullableTemplateSummaryTaskAllOf) Get() *TemplateSummaryTaskAllOf { + return v.value +} + +func (v *NullableTemplateSummaryTaskAllOf) Set(val *TemplateSummaryTaskAllOf) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateSummaryTaskAllOf) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateSummaryTaskAllOf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateSummaryTaskAllOf(val *TemplateSummaryTaskAllOf) *NullableTemplateSummaryTaskAllOf { + return &NullableTemplateSummaryTaskAllOf{value: val, isSet: true} +} + +func (v NullableTemplateSummaryTaskAllOf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateSummaryTaskAllOf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/model_template_summary_telegraf.gen.go b/api/model_template_summary_telegraf.gen.go new file mode 100644 index 0000000..aa89d28 --- /dev/null +++ b/api/model_template_summary_telegraf.gen.go @@ -0,0 +1,229 @@ +/* + * Subset of Influx API covered by Influx CLI + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package api + +import ( + "encoding/json" +) + +// TemplateSummaryTelegraf struct for TemplateSummaryTelegraf +type TemplateSummaryTelegraf struct { + Kind string `json:"kind"` + TemplateMetaName *string `json:"templateMetaName,omitempty"` + EnvReferences []TemplateEnvReference `json:"envReferences"` + LabelAssociations []TemplateSummaryLabel `json:"labelAssociations"` + TelegrafConfig TemplateSummaryTelegrafConfig `json:"telegrafConfig"` +} + +// NewTemplateSummaryTelegraf instantiates a new TemplateSummaryTelegraf object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateSummaryTelegraf(kind string, envReferences []TemplateEnvReference, labelAssociations []TemplateSummaryLabel, telegrafConfig TemplateSummaryTelegrafConfig) *TemplateSummaryTelegraf { + this := TemplateSummaryTelegraf{} + this.Kind = kind + this.EnvReferences = envReferences + this.LabelAssociations = labelAssociations + this.TelegrafConfig = telegrafConfig + return &this +} + +// NewTemplateSummaryTelegrafWithDefaults instantiates a new TemplateSummaryTelegraf object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateSummaryTelegrafWithDefaults() *TemplateSummaryTelegraf { + this := TemplateSummaryTelegraf{} + return &this +} + +// GetKind returns the Kind field value +func (o *TemplateSummaryTelegraf) GetKind() string { + if o == nil { + var ret string + return ret + } + + return o.Kind +} + +// GetKindOk returns a tuple with the Kind field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryTelegraf) GetKindOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Kind, true +} + +// SetKind sets field value +func (o *TemplateSummaryTelegraf) SetKind(v string) { + o.Kind = v +} + +// GetTemplateMetaName returns the TemplateMetaName field value if set, zero value otherwise. +func (o *TemplateSummaryTelegraf) GetTemplateMetaName() string { + if o == nil || o.TemplateMetaName == nil { + var ret string + return ret + } + return *o.TemplateMetaName +} + +// GetTemplateMetaNameOk returns a tuple with the TemplateMetaName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryTelegraf) GetTemplateMetaNameOk() (*string, bool) { + if o == nil || o.TemplateMetaName == nil { + return nil, false + } + return o.TemplateMetaName, true +} + +// HasTemplateMetaName returns a boolean if a field has been set. +func (o *TemplateSummaryTelegraf) HasTemplateMetaName() bool { + if o != nil && o.TemplateMetaName != nil { + return true + } + + return false +} + +// SetTemplateMetaName gets a reference to the given string and assigns it to the TemplateMetaName field. +func (o *TemplateSummaryTelegraf) SetTemplateMetaName(v string) { + o.TemplateMetaName = &v +} + +// GetEnvReferences returns the EnvReferences field value +func (o *TemplateSummaryTelegraf) GetEnvReferences() []TemplateEnvReference { + if o == nil { + var ret []TemplateEnvReference + return ret + } + + return o.EnvReferences +} + +// GetEnvReferencesOk returns a tuple with the EnvReferences field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryTelegraf) GetEnvReferencesOk() (*[]TemplateEnvReference, bool) { + if o == nil { + return nil, false + } + return &o.EnvReferences, true +} + +// SetEnvReferences sets field value +func (o *TemplateSummaryTelegraf) SetEnvReferences(v []TemplateEnvReference) { + o.EnvReferences = v +} + +// GetLabelAssociations returns the LabelAssociations field value +func (o *TemplateSummaryTelegraf) GetLabelAssociations() []TemplateSummaryLabel { + if o == nil { + var ret []TemplateSummaryLabel + return ret + } + + return o.LabelAssociations +} + +// GetLabelAssociationsOk returns a tuple with the LabelAssociations field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryTelegraf) GetLabelAssociationsOk() (*[]TemplateSummaryLabel, bool) { + if o == nil { + return nil, false + } + return &o.LabelAssociations, true +} + +// SetLabelAssociations sets field value +func (o *TemplateSummaryTelegraf) SetLabelAssociations(v []TemplateSummaryLabel) { + o.LabelAssociations = v +} + +// GetTelegrafConfig returns the TelegrafConfig field value +func (o *TemplateSummaryTelegraf) GetTelegrafConfig() TemplateSummaryTelegrafConfig { + if o == nil { + var ret TemplateSummaryTelegrafConfig + return ret + } + + return o.TelegrafConfig +} + +// GetTelegrafConfigOk returns a tuple with the TelegrafConfig field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryTelegraf) GetTelegrafConfigOk() (*TemplateSummaryTelegrafConfig, bool) { + if o == nil { + return nil, false + } + return &o.TelegrafConfig, true +} + +// SetTelegrafConfig sets field value +func (o *TemplateSummaryTelegraf) SetTelegrafConfig(v TemplateSummaryTelegrafConfig) { + o.TelegrafConfig = v +} + +func (o TemplateSummaryTelegraf) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["kind"] = o.Kind + } + if o.TemplateMetaName != nil { + toSerialize["templateMetaName"] = o.TemplateMetaName + } + if true { + toSerialize["envReferences"] = o.EnvReferences + } + if true { + toSerialize["labelAssociations"] = o.LabelAssociations + } + if true { + toSerialize["telegrafConfig"] = o.TelegrafConfig + } + return json.Marshal(toSerialize) +} + +type NullableTemplateSummaryTelegraf struct { + value *TemplateSummaryTelegraf + isSet bool +} + +func (v NullableTemplateSummaryTelegraf) Get() *TemplateSummaryTelegraf { + return v.value +} + +func (v *NullableTemplateSummaryTelegraf) Set(val *TemplateSummaryTelegraf) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateSummaryTelegraf) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateSummaryTelegraf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateSummaryTelegraf(val *TemplateSummaryTelegraf) *NullableTemplateSummaryTelegraf { + return &NullableTemplateSummaryTelegraf{value: val, isSet: true} +} + +func (v NullableTemplateSummaryTelegraf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateSummaryTelegraf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/model_template_summary_telegraf_all_of.gen.go b/api/model_template_summary_telegraf_all_of.gen.go new file mode 100644 index 0000000..45b10f9 --- /dev/null +++ b/api/model_template_summary_telegraf_all_of.gen.go @@ -0,0 +1,106 @@ +/* + * Subset of Influx API covered by Influx CLI + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package api + +import ( + "encoding/json" +) + +// TemplateSummaryTelegrafAllOf struct for TemplateSummaryTelegrafAllOf +type TemplateSummaryTelegrafAllOf struct { + TelegrafConfig TemplateSummaryTelegrafConfig `json:"telegrafConfig"` +} + +// NewTemplateSummaryTelegrafAllOf instantiates a new TemplateSummaryTelegrafAllOf object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateSummaryTelegrafAllOf(telegrafConfig TemplateSummaryTelegrafConfig) *TemplateSummaryTelegrafAllOf { + this := TemplateSummaryTelegrafAllOf{} + this.TelegrafConfig = telegrafConfig + return &this +} + +// NewTemplateSummaryTelegrafAllOfWithDefaults instantiates a new TemplateSummaryTelegrafAllOf object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateSummaryTelegrafAllOfWithDefaults() *TemplateSummaryTelegrafAllOf { + this := TemplateSummaryTelegrafAllOf{} + return &this +} + +// GetTelegrafConfig returns the TelegrafConfig field value +func (o *TemplateSummaryTelegrafAllOf) GetTelegrafConfig() TemplateSummaryTelegrafConfig { + if o == nil { + var ret TemplateSummaryTelegrafConfig + return ret + } + + return o.TelegrafConfig +} + +// GetTelegrafConfigOk returns a tuple with the TelegrafConfig field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryTelegrafAllOf) GetTelegrafConfigOk() (*TemplateSummaryTelegrafConfig, bool) { + if o == nil { + return nil, false + } + return &o.TelegrafConfig, true +} + +// SetTelegrafConfig sets field value +func (o *TemplateSummaryTelegrafAllOf) SetTelegrafConfig(v TemplateSummaryTelegrafConfig) { + o.TelegrafConfig = v +} + +func (o TemplateSummaryTelegrafAllOf) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["telegrafConfig"] = o.TelegrafConfig + } + return json.Marshal(toSerialize) +} + +type NullableTemplateSummaryTelegrafAllOf struct { + value *TemplateSummaryTelegrafAllOf + isSet bool +} + +func (v NullableTemplateSummaryTelegrafAllOf) Get() *TemplateSummaryTelegrafAllOf { + return v.value +} + +func (v *NullableTemplateSummaryTelegrafAllOf) Set(val *TemplateSummaryTelegrafAllOf) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateSummaryTelegrafAllOf) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateSummaryTelegrafAllOf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateSummaryTelegrafAllOf(val *TemplateSummaryTelegrafAllOf) *NullableTemplateSummaryTelegrafAllOf { + return &NullableTemplateSummaryTelegrafAllOf{value: val, isSet: true} +} + +func (v NullableTemplateSummaryTelegrafAllOf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateSummaryTelegrafAllOf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/model_template_summary_telegraf_config.gen.go b/api/model_template_summary_telegraf_config.gen.go new file mode 100644 index 0000000..8df9692 --- /dev/null +++ b/api/model_template_summary_telegraf_config.gen.go @@ -0,0 +1,171 @@ +/* + * Subset of Influx API covered by Influx CLI + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package api + +import ( + "encoding/json" +) + +// TemplateSummaryTelegrafConfig struct for TemplateSummaryTelegrafConfig +type TemplateSummaryTelegrafConfig struct { + Id string `json:"id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` +} + +// NewTemplateSummaryTelegrafConfig instantiates a new TemplateSummaryTelegrafConfig object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateSummaryTelegrafConfig(id string, name string) *TemplateSummaryTelegrafConfig { + this := TemplateSummaryTelegrafConfig{} + this.Id = id + this.Name = name + return &this +} + +// NewTemplateSummaryTelegrafConfigWithDefaults instantiates a new TemplateSummaryTelegrafConfig object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateSummaryTelegrafConfigWithDefaults() *TemplateSummaryTelegrafConfig { + this := TemplateSummaryTelegrafConfig{} + return &this +} + +// GetId returns the Id field value +func (o *TemplateSummaryTelegrafConfig) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryTelegrafConfig) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *TemplateSummaryTelegrafConfig) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *TemplateSummaryTelegrafConfig) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryTelegrafConfig) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *TemplateSummaryTelegrafConfig) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *TemplateSummaryTelegrafConfig) GetDescription() string { + if o == nil || o.Description == nil { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryTelegrafConfig) GetDescriptionOk() (*string, bool) { + if o == nil || o.Description == nil { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *TemplateSummaryTelegrafConfig) HasDescription() bool { + if o != nil && o.Description != nil { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *TemplateSummaryTelegrafConfig) SetDescription(v string) { + o.Description = &v +} + +func (o TemplateSummaryTelegrafConfig) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["id"] = o.Id + } + if true { + toSerialize["name"] = o.Name + } + if o.Description != nil { + toSerialize["description"] = o.Description + } + return json.Marshal(toSerialize) +} + +type NullableTemplateSummaryTelegrafConfig struct { + value *TemplateSummaryTelegrafConfig + isSet bool +} + +func (v NullableTemplateSummaryTelegrafConfig) Get() *TemplateSummaryTelegrafConfig { + return v.value +} + +func (v *NullableTemplateSummaryTelegrafConfig) Set(val *TemplateSummaryTelegrafConfig) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateSummaryTelegrafConfig) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateSummaryTelegrafConfig) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateSummaryTelegrafConfig(val *TemplateSummaryTelegrafConfig) *NullableTemplateSummaryTelegrafConfig { + return &NullableTemplateSummaryTelegrafConfig{value: val, isSet: true} +} + +func (v NullableTemplateSummaryTelegrafConfig) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateSummaryTelegrafConfig) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/model_template_summary_variable.gen.go b/api/model_template_summary_variable.gen.go new file mode 100644 index 0000000..8455bc1 --- /dev/null +++ b/api/model_template_summary_variable.gen.go @@ -0,0 +1,323 @@ +/* + * Subset of Influx API covered by Influx CLI + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package api + +import ( + "encoding/json" +) + +// TemplateSummaryVariable struct for TemplateSummaryVariable +type TemplateSummaryVariable struct { + Kind string `json:"kind"` + TemplateMetaName *string `json:"templateMetaName,omitempty"` + EnvReferences []TemplateEnvReference `json:"envReferences"` + LabelAssociations []TemplateSummaryLabel `json:"labelAssociations"` + Id string `json:"id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Arguments TemplateSummaryVariableArgs `json:"arguments"` +} + +// NewTemplateSummaryVariable instantiates a new TemplateSummaryVariable object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateSummaryVariable(kind string, envReferences []TemplateEnvReference, labelAssociations []TemplateSummaryLabel, id string, name string, arguments TemplateSummaryVariableArgs) *TemplateSummaryVariable { + this := TemplateSummaryVariable{} + this.Kind = kind + this.EnvReferences = envReferences + this.LabelAssociations = labelAssociations + this.Id = id + this.Name = name + this.Arguments = arguments + return &this +} + +// NewTemplateSummaryVariableWithDefaults instantiates a new TemplateSummaryVariable object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateSummaryVariableWithDefaults() *TemplateSummaryVariable { + this := TemplateSummaryVariable{} + return &this +} + +// GetKind returns the Kind field value +func (o *TemplateSummaryVariable) GetKind() string { + if o == nil { + var ret string + return ret + } + + return o.Kind +} + +// GetKindOk returns a tuple with the Kind field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryVariable) GetKindOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Kind, true +} + +// SetKind sets field value +func (o *TemplateSummaryVariable) SetKind(v string) { + o.Kind = v +} + +// GetTemplateMetaName returns the TemplateMetaName field value if set, zero value otherwise. +func (o *TemplateSummaryVariable) GetTemplateMetaName() string { + if o == nil || o.TemplateMetaName == nil { + var ret string + return ret + } + return *o.TemplateMetaName +} + +// GetTemplateMetaNameOk returns a tuple with the TemplateMetaName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryVariable) GetTemplateMetaNameOk() (*string, bool) { + if o == nil || o.TemplateMetaName == nil { + return nil, false + } + return o.TemplateMetaName, true +} + +// HasTemplateMetaName returns a boolean if a field has been set. +func (o *TemplateSummaryVariable) HasTemplateMetaName() bool { + if o != nil && o.TemplateMetaName != nil { + return true + } + + return false +} + +// SetTemplateMetaName gets a reference to the given string and assigns it to the TemplateMetaName field. +func (o *TemplateSummaryVariable) SetTemplateMetaName(v string) { + o.TemplateMetaName = &v +} + +// GetEnvReferences returns the EnvReferences field value +func (o *TemplateSummaryVariable) GetEnvReferences() []TemplateEnvReference { + if o == nil { + var ret []TemplateEnvReference + return ret + } + + return o.EnvReferences +} + +// GetEnvReferencesOk returns a tuple with the EnvReferences field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryVariable) GetEnvReferencesOk() (*[]TemplateEnvReference, bool) { + if o == nil { + return nil, false + } + return &o.EnvReferences, true +} + +// SetEnvReferences sets field value +func (o *TemplateSummaryVariable) SetEnvReferences(v []TemplateEnvReference) { + o.EnvReferences = v +} + +// GetLabelAssociations returns the LabelAssociations field value +func (o *TemplateSummaryVariable) GetLabelAssociations() []TemplateSummaryLabel { + if o == nil { + var ret []TemplateSummaryLabel + return ret + } + + return o.LabelAssociations +} + +// GetLabelAssociationsOk returns a tuple with the LabelAssociations field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryVariable) GetLabelAssociationsOk() (*[]TemplateSummaryLabel, bool) { + if o == nil { + return nil, false + } + return &o.LabelAssociations, true +} + +// SetLabelAssociations sets field value +func (o *TemplateSummaryVariable) SetLabelAssociations(v []TemplateSummaryLabel) { + o.LabelAssociations = v +} + +// GetId returns the Id field value +func (o *TemplateSummaryVariable) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryVariable) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *TemplateSummaryVariable) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *TemplateSummaryVariable) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryVariable) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *TemplateSummaryVariable) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *TemplateSummaryVariable) GetDescription() string { + if o == nil || o.Description == nil { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryVariable) GetDescriptionOk() (*string, bool) { + if o == nil || o.Description == nil { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *TemplateSummaryVariable) HasDescription() bool { + if o != nil && o.Description != nil { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *TemplateSummaryVariable) SetDescription(v string) { + o.Description = &v +} + +// GetArguments returns the Arguments field value +func (o *TemplateSummaryVariable) GetArguments() TemplateSummaryVariableArgs { + if o == nil { + var ret TemplateSummaryVariableArgs + return ret + } + + return o.Arguments +} + +// GetArgumentsOk returns a tuple with the Arguments field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryVariable) GetArgumentsOk() (*TemplateSummaryVariableArgs, bool) { + if o == nil { + return nil, false + } + return &o.Arguments, true +} + +// SetArguments sets field value +func (o *TemplateSummaryVariable) SetArguments(v TemplateSummaryVariableArgs) { + o.Arguments = v +} + +func (o TemplateSummaryVariable) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["kind"] = o.Kind + } + if o.TemplateMetaName != nil { + toSerialize["templateMetaName"] = o.TemplateMetaName + } + if true { + toSerialize["envReferences"] = o.EnvReferences + } + if true { + toSerialize["labelAssociations"] = o.LabelAssociations + } + if true { + toSerialize["id"] = o.Id + } + if true { + toSerialize["name"] = o.Name + } + if o.Description != nil { + toSerialize["description"] = o.Description + } + if true { + toSerialize["arguments"] = o.Arguments + } + return json.Marshal(toSerialize) +} + +type NullableTemplateSummaryVariable struct { + value *TemplateSummaryVariable + isSet bool +} + +func (v NullableTemplateSummaryVariable) Get() *TemplateSummaryVariable { + return v.value +} + +func (v *NullableTemplateSummaryVariable) Set(val *TemplateSummaryVariable) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateSummaryVariable) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateSummaryVariable) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateSummaryVariable(val *TemplateSummaryVariable) *NullableTemplateSummaryVariable { + return &NullableTemplateSummaryVariable{value: val, isSet: true} +} + +func (v NullableTemplateSummaryVariable) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateSummaryVariable) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/model_template_summary_variable_all_of.gen.go b/api/model_template_summary_variable_all_of.gen.go new file mode 100644 index 0000000..ac399aa --- /dev/null +++ b/api/model_template_summary_variable_all_of.gen.go @@ -0,0 +1,200 @@ +/* + * Subset of Influx API covered by Influx CLI + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package api + +import ( + "encoding/json" +) + +// TemplateSummaryVariableAllOf struct for TemplateSummaryVariableAllOf +type TemplateSummaryVariableAllOf struct { + Id string `json:"id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Arguments TemplateSummaryVariableArgs `json:"arguments"` +} + +// NewTemplateSummaryVariableAllOf instantiates a new TemplateSummaryVariableAllOf object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateSummaryVariableAllOf(id string, name string, arguments TemplateSummaryVariableArgs) *TemplateSummaryVariableAllOf { + this := TemplateSummaryVariableAllOf{} + this.Id = id + this.Name = name + this.Arguments = arguments + return &this +} + +// NewTemplateSummaryVariableAllOfWithDefaults instantiates a new TemplateSummaryVariableAllOf object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateSummaryVariableAllOfWithDefaults() *TemplateSummaryVariableAllOf { + this := TemplateSummaryVariableAllOf{} + return &this +} + +// GetId returns the Id field value +func (o *TemplateSummaryVariableAllOf) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryVariableAllOf) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *TemplateSummaryVariableAllOf) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *TemplateSummaryVariableAllOf) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryVariableAllOf) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *TemplateSummaryVariableAllOf) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *TemplateSummaryVariableAllOf) GetDescription() string { + if o == nil || o.Description == nil { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateSummaryVariableAllOf) GetDescriptionOk() (*string, bool) { + if o == nil || o.Description == nil { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *TemplateSummaryVariableAllOf) HasDescription() bool { + if o != nil && o.Description != nil { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *TemplateSummaryVariableAllOf) SetDescription(v string) { + o.Description = &v +} + +// GetArguments returns the Arguments field value +func (o *TemplateSummaryVariableAllOf) GetArguments() TemplateSummaryVariableArgs { + if o == nil { + var ret TemplateSummaryVariableArgs + return ret + } + + return o.Arguments +} + +// GetArgumentsOk returns a tuple with the Arguments field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryVariableAllOf) GetArgumentsOk() (*TemplateSummaryVariableArgs, bool) { + if o == nil { + return nil, false + } + return &o.Arguments, true +} + +// SetArguments sets field value +func (o *TemplateSummaryVariableAllOf) SetArguments(v TemplateSummaryVariableArgs) { + o.Arguments = v +} + +func (o TemplateSummaryVariableAllOf) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["id"] = o.Id + } + if true { + toSerialize["name"] = o.Name + } + if o.Description != nil { + toSerialize["description"] = o.Description + } + if true { + toSerialize["arguments"] = o.Arguments + } + return json.Marshal(toSerialize) +} + +type NullableTemplateSummaryVariableAllOf struct { + value *TemplateSummaryVariableAllOf + isSet bool +} + +func (v NullableTemplateSummaryVariableAllOf) Get() *TemplateSummaryVariableAllOf { + return v.value +} + +func (v *NullableTemplateSummaryVariableAllOf) Set(val *TemplateSummaryVariableAllOf) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateSummaryVariableAllOf) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateSummaryVariableAllOf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateSummaryVariableAllOf(val *TemplateSummaryVariableAllOf) *NullableTemplateSummaryVariableAllOf { + return &NullableTemplateSummaryVariableAllOf{value: val, isSet: true} +} + +func (v NullableTemplateSummaryVariableAllOf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateSummaryVariableAllOf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/model_template_summary_variable_args.gen.go b/api/model_template_summary_variable_args.gen.go new file mode 100644 index 0000000..38e816f --- /dev/null +++ b/api/model_template_summary_variable_args.gen.go @@ -0,0 +1,131 @@ +/* + * Subset of Influx API covered by Influx CLI + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 2.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package api + +import ( + "encoding/json" +) + +// TemplateSummaryVariableArgs struct for TemplateSummaryVariableArgs +type TemplateSummaryVariableArgs struct { + Type string `json:"type"` + AdditionalProperties map[string]interface{} +} + +type _TemplateSummaryVariableArgs TemplateSummaryVariableArgs + +// NewTemplateSummaryVariableArgs instantiates a new TemplateSummaryVariableArgs object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateSummaryVariableArgs(type_ string) *TemplateSummaryVariableArgs { + this := TemplateSummaryVariableArgs{} + this.Type = type_ + return &this +} + +// NewTemplateSummaryVariableArgsWithDefaults instantiates a new TemplateSummaryVariableArgs object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateSummaryVariableArgsWithDefaults() *TemplateSummaryVariableArgs { + this := TemplateSummaryVariableArgs{} + return &this +} + +// GetType returns the Type field value +func (o *TemplateSummaryVariableArgs) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *TemplateSummaryVariableArgs) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *TemplateSummaryVariableArgs) SetType(v string) { + o.Type = v +} + +func (o TemplateSummaryVariableArgs) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["type"] = o.Type + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return json.Marshal(toSerialize) +} + +func (o *TemplateSummaryVariableArgs) UnmarshalJSON(bytes []byte) (err error) { + varTemplateSummaryVariableArgs := _TemplateSummaryVariableArgs{} + + if err = json.Unmarshal(bytes, &varTemplateSummaryVariableArgs); err == nil { + *o = TemplateSummaryVariableArgs(varTemplateSummaryVariableArgs) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableTemplateSummaryVariableArgs struct { + value *TemplateSummaryVariableArgs + isSet bool +} + +func (v NullableTemplateSummaryVariableArgs) Get() *TemplateSummaryVariableArgs { + return v.value +} + +func (v *NullableTemplateSummaryVariableArgs) Set(val *TemplateSummaryVariableArgs) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateSummaryVariableArgs) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateSummaryVariableArgs) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateSummaryVariableArgs(val *TemplateSummaryVariableArgs) *NullableTemplateSummaryVariableArgs { + return &NullableTemplateSummaryVariableArgs{value: val, isSet: true} +} + +func (v NullableTemplateSummaryVariableArgs) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateSummaryVariableArgs) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +}