diff --git a/services/dns/api_default.go b/services/dns/api_default.go index 81f4513b1..b64910e77 100644 --- a/services/dns/api_default.go +++ b/services/dns/api_default.go @@ -127,6 +127,17 @@ func (r ApiCloneZoneRequest) Execute() (*ZoneResponse, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorMessage + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } if localVarHTTPResponse.StatusCode == 404 { var v Message err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -305,6 +316,17 @@ func (r ApiCreateLabelRequest) Execute() (*CreateLabelResponse, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorMessage + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } if localVarHTTPResponse.StatusCode == 404 { var v Message err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -459,6 +481,17 @@ func (r ApiCreateMoveCodeRequest) Execute() (*MoveCodeResponse, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorMessage + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } if localVarHTTPResponse.StatusCode == 409 { var v Message err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -626,6 +659,17 @@ func (r ApiCreateRecordSetRequest) Execute() (*RecordSetResponse, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorMessage + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } if localVarHTTPResponse.StatusCode == 404 { var v Message err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -802,6 +846,17 @@ func (r ApiCreateZoneRequest) Execute() (*ZoneResponse, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorMessage + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } if localVarHTTPResponse.StatusCode == 404 { var v Message err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -955,6 +1010,28 @@ func (r ApiDeleteLabelRequest) Execute() (*DeleteLabelResponse, error) { Body: localVarBody, ErrorMessage: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorMessage + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorMessage + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } if localVarHTTPResponse.StatusCode == 403 { var v Message err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -1112,6 +1189,28 @@ func (r ApiDeleteMoveCodeRequest) Execute() (*Message, error) { Body: localVarBody, ErrorMessage: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorMessage + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorMessage + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } if localVarHTTPResponse.StatusCode == 404 { var v Message err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -1268,6 +1367,17 @@ func (r ApiDeleteRecordSetRequest) Execute() (*Message, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorMessage + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } if localVarHTTPResponse.StatusCode == 404 { var v Message err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -1425,6 +1535,17 @@ func (r ApiDeleteZoneRequest) Execute() (*Message, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorMessage + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } if localVarHTTPResponse.StatusCode == 404 { var v Message err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -1592,6 +1713,17 @@ func (r ApiExportRecordSetsRequest) Execute() (*ZoneDataExchange, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorMessage + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } if localVarHTTPResponse.StatusCode == 403 { var v Message err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -1726,6 +1858,28 @@ func (r ApiGetRecordSetRequest) Execute() (*RecordSetResponse, error) { Body: localVarBody, ErrorMessage: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorMessage + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorMessage + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } if localVarHTTPResponse.StatusCode == 404 { var v Message err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -1872,6 +2026,28 @@ func (r ApiGetZoneRequest) Execute() (*ZoneResponse, error) { Body: localVarBody, ErrorMessage: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorMessage + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorMessage + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } if localVarHTTPResponse.StatusCode == 404 { var v Message err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -2061,6 +2237,17 @@ func (r ApiImportRecordSetsRequest) Execute() (*ImportRecordSetsResponse, error) newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorMessage + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } if localVarHTTPResponse.StatusCode == 403 { var v Message err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -2204,6 +2391,28 @@ func (r ApiListLabelsRequest) Execute() (*ListLabelsResponse, error) { Body: localVarBody, ErrorMessage: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorMessage + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorMessage + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } if localVarHTTPResponse.StatusCode == 403 { var v Message err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -2710,6 +2919,28 @@ func (r ApiListRecordSetsRequest) Execute() (*ListRecordSetsResponse, error) { Body: localVarBody, ErrorMessage: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorMessage + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorMessage + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } if localVarHTTPResponse.StatusCode == 404 { var v Message err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -3335,6 +3566,28 @@ func (r ApiListZonesRequest) Execute() (*ListZonesResponse, error) { Body: localVarBody, ErrorMessage: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorMessage + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorMessage + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } if localVarHTTPResponse.StatusCode == 404 { var v Message err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -3497,6 +3750,17 @@ func (r ApiMoveZoneRequest) Execute() (*Message, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorMessage + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } if localVarHTTPResponse.StatusCode == 404 { var v Message err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -3663,6 +3927,17 @@ func (r ApiPartialUpdateRecordRequest) Execute() (*Message, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorMessage + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } if localVarHTTPResponse.StatusCode == 404 { var v Message err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -3835,6 +4110,17 @@ func (r ApiPartialUpdateRecordSetRequest) Execute() (*Message, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorMessage + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } if localVarHTTPResponse.StatusCode == 404 { var v Message err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -4005,6 +4291,17 @@ func (r ApiPartialUpdateZoneRequest) Execute() (*ZoneResponse, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorMessage + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } if localVarHTTPResponse.StatusCode == 404 { var v Message err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -4150,6 +4447,28 @@ func (r ApiRestoreRecordSetRequest) Execute() (*Message, error) { Body: localVarBody, ErrorMessage: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorMessage + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorMessage + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } if localVarHTTPResponse.StatusCode == 404 { var v Message err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -4307,6 +4626,17 @@ func (r ApiRestoreZoneRequest) Execute() (*Message, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorMessage + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } if localVarHTTPResponse.StatusCode == 502 { var v Message err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -4450,6 +4780,17 @@ func (r ApiRetrieveZoneRequest) Execute() (*Message, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorMessage + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } if localVarHTTPResponse.StatusCode == 502 { var v Message err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -4606,6 +4947,17 @@ func (r ApiValidateMoveCodeRequest) Execute() (*Message, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorMessage + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } if localVarHTTPResponse.StatusCode == 502 { var v Message err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) diff --git a/services/dns/api_default_test.go b/services/dns/api_default_test.go index 9ae06e3cd..16cf6b20a 100644 --- a/services/dns/api_default_test.go +++ b/services/dns/api_default_test.go @@ -24,14 +24,14 @@ import ( func Test_dns_DefaultApiService(t *testing.T) { t.Run("Test DefaultApiService CloneZone", func(t *testing.T) { - path := "/v1/projects/{projectId}/zones/{zoneId}/clone" + _apiUrlPath := "/v1/projects/{projectId}/zones/{zoneId}/clone" projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) zoneIdValue := "zoneId" - path = strings.Replace(path, "{"+"zoneId"+"}", url.PathEscape(ParameterValueToString(zoneIdValue, "zoneId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"zoneId"+"}", url.PathEscape(ParameterValueToString(zoneIdValue, "zoneId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := ZoneResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -65,8 +65,8 @@ func Test_dns_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" - zoneId := "zoneId" + projectId := projectIdValue + zoneId := zoneIdValue cloneZonePayload := CloneZonePayload{} resp, reqErr := apiClient.CloneZone(context.Background(), projectId, zoneId).CloneZonePayload(cloneZonePayload).Execute() @@ -74,20 +74,20 @@ func Test_dns_DefaultApiService(t *testing.T) { if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService CreateLabel", func(t *testing.T) { - path := "/v1/projects/{projectId}/zones/{zoneId}/labels" + _apiUrlPath := "/v1/projects/{projectId}/zones/{zoneId}/labels" projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) zoneIdValue := "zoneId" - path = strings.Replace(path, "{"+"zoneId"+"}", url.PathEscape(ParameterValueToString(zoneIdValue, "zoneId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"zoneId"+"}", url.PathEscape(ParameterValueToString(zoneIdValue, "zoneId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := CreateLabelResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -121,8 +121,8 @@ func Test_dns_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" - zoneId := "zoneId" + projectId := projectIdValue + zoneId := zoneIdValue createLabelPayload := CreateLabelPayload{} resp, reqErr := apiClient.CreateLabel(context.Background(), projectId, zoneId).CreateLabelPayload(createLabelPayload).Execute() @@ -130,20 +130,20 @@ func Test_dns_DefaultApiService(t *testing.T) { if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService CreateMoveCode", func(t *testing.T) { - path := "/v1/projects/{projectId}/zones/{zoneId}/move-code" + _apiUrlPath := "/v1/projects/{projectId}/zones/{zoneId}/move-code" projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) zoneIdValue := "zoneId" - path = strings.Replace(path, "{"+"zoneId"+"}", url.PathEscape(ParameterValueToString(zoneIdValue, "zoneId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"zoneId"+"}", url.PathEscape(ParameterValueToString(zoneIdValue, "zoneId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := MoveCodeResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -177,28 +177,28 @@ func Test_dns_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" - zoneId := "zoneId" + projectId := projectIdValue + zoneId := zoneIdValue resp, reqErr := apiClient.CreateMoveCode(context.Background(), projectId, zoneId).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService CreateRecordSet", func(t *testing.T) { - path := "/v1/projects/{projectId}/zones/{zoneId}/rrsets" + _apiUrlPath := "/v1/projects/{projectId}/zones/{zoneId}/rrsets" projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) zoneIdValue := "zoneId" - path = strings.Replace(path, "{"+"zoneId"+"}", url.PathEscape(ParameterValueToString(zoneIdValue, "zoneId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"zoneId"+"}", url.PathEscape(ParameterValueToString(zoneIdValue, "zoneId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := RecordSetResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -232,8 +232,8 @@ func Test_dns_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" - zoneId := "zoneId" + projectId := projectIdValue + zoneId := zoneIdValue createRecordSetPayload := CreateRecordSetPayload{} resp, reqErr := apiClient.CreateRecordSet(context.Background(), projectId, zoneId).CreateRecordSetPayload(createRecordSetPayload).Execute() @@ -241,18 +241,18 @@ func Test_dns_DefaultApiService(t *testing.T) { if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService CreateZone", func(t *testing.T) { - path := "/v1/projects/{projectId}/zones" + _apiUrlPath := "/v1/projects/{projectId}/zones" projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := ZoneResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -286,7 +286,7 @@ func Test_dns_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" + projectId := projectIdValue createZonePayload := CreateZonePayload{} resp, reqErr := apiClient.CreateZone(context.Background(), projectId).CreateZonePayload(createZonePayload).Execute() @@ -294,22 +294,22 @@ func Test_dns_DefaultApiService(t *testing.T) { if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService DeleteLabel", func(t *testing.T) { - path := "/v1/projects/{projectId}/zones/{zoneId}/labels/{key}" + _apiUrlPath := "/v1/projects/{projectId}/zones/{zoneId}/labels/{key}" projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) zoneIdValue := "zoneId" - path = strings.Replace(path, "{"+"zoneId"+"}", url.PathEscape(ParameterValueToString(zoneIdValue, "zoneId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"zoneId"+"}", url.PathEscape(ParameterValueToString(zoneIdValue, "zoneId")), -1) keyValue := "key" - path = strings.Replace(path, "{"+"key"+"}", url.PathEscape(ParameterValueToString(keyValue, "key")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"key"+"}", url.PathEscape(ParameterValueToString(keyValue, "key")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := DeleteLabelResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -343,29 +343,29 @@ func Test_dns_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" - zoneId := "zoneId" - key := "key" + projectId := projectIdValue + zoneId := zoneIdValue + key := keyValue resp, reqErr := apiClient.DeleteLabel(context.Background(), projectId, zoneId, key).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService DeleteMoveCode", func(t *testing.T) { - path := "/v1/projects/{projectId}/zones/{zoneId}/move-code" + _apiUrlPath := "/v1/projects/{projectId}/zones/{zoneId}/move-code" projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) zoneIdValue := "zoneId" - path = strings.Replace(path, "{"+"zoneId"+"}", url.PathEscape(ParameterValueToString(zoneIdValue, "zoneId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"zoneId"+"}", url.PathEscape(ParameterValueToString(zoneIdValue, "zoneId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := Message{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -399,30 +399,30 @@ func Test_dns_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" - zoneId := "zoneId" + projectId := projectIdValue + zoneId := zoneIdValue resp, reqErr := apiClient.DeleteMoveCode(context.Background(), projectId, zoneId).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService DeleteRecordSet", func(t *testing.T) { - path := "/v1/projects/{projectId}/zones/{zoneId}/rrsets/{rrSetId}" + _apiUrlPath := "/v1/projects/{projectId}/zones/{zoneId}/rrsets/{rrSetId}" projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) zoneIdValue := "zoneId" - path = strings.Replace(path, "{"+"zoneId"+"}", url.PathEscape(ParameterValueToString(zoneIdValue, "zoneId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"zoneId"+"}", url.PathEscape(ParameterValueToString(zoneIdValue, "zoneId")), -1) rrSetIdValue := "rrSetId" - path = strings.Replace(path, "{"+"rrSetId"+"}", url.PathEscape(ParameterValueToString(rrSetIdValue, "rrSetId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"rrSetId"+"}", url.PathEscape(ParameterValueToString(rrSetIdValue, "rrSetId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := Message{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -456,29 +456,29 @@ func Test_dns_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" - zoneId := "zoneId" - rrSetId := "rrSetId" + projectId := projectIdValue + zoneId := zoneIdValue + rrSetId := rrSetIdValue resp, reqErr := apiClient.DeleteRecordSet(context.Background(), projectId, zoneId, rrSetId).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService DeleteZone", func(t *testing.T) { - path := "/v1/projects/{projectId}/zones/{zoneId}" + _apiUrlPath := "/v1/projects/{projectId}/zones/{zoneId}" projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) zoneIdValue := "zoneId" - path = strings.Replace(path, "{"+"zoneId"+"}", url.PathEscape(ParameterValueToString(zoneIdValue, "zoneId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"zoneId"+"}", url.PathEscape(ParameterValueToString(zoneIdValue, "zoneId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := Message{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -512,28 +512,28 @@ func Test_dns_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" - zoneId := "zoneId" + projectId := projectIdValue + zoneId := zoneIdValue resp, reqErr := apiClient.DeleteZone(context.Background(), projectId, zoneId).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService ExportRecordSets", func(t *testing.T) { - path := "/v1/projects/{projectId}/zones/{zoneId}/export" + _apiUrlPath := "/v1/projects/{projectId}/zones/{zoneId}/export" projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) zoneIdValue := "zoneId" - path = strings.Replace(path, "{"+"zoneId"+"}", url.PathEscape(ParameterValueToString(zoneIdValue, "zoneId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"zoneId"+"}", url.PathEscape(ParameterValueToString(zoneIdValue, "zoneId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := ZoneDataExchange{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -567,8 +567,8 @@ func Test_dns_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" - zoneId := "zoneId" + projectId := projectIdValue + zoneId := zoneIdValue exportRecordSetsPayload := ExportRecordSetsPayload{} resp, reqErr := apiClient.ExportRecordSets(context.Background(), projectId, zoneId).ExportRecordSetsPayload(exportRecordSetsPayload).Execute() @@ -576,22 +576,22 @@ func Test_dns_DefaultApiService(t *testing.T) { if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService GetRecordSet", func(t *testing.T) { - path := "/v1/projects/{projectId}/zones/{zoneId}/rrsets/{rrSetId}" + _apiUrlPath := "/v1/projects/{projectId}/zones/{zoneId}/rrsets/{rrSetId}" projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) zoneIdValue := "zoneId" - path = strings.Replace(path, "{"+"zoneId"+"}", url.PathEscape(ParameterValueToString(zoneIdValue, "zoneId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"zoneId"+"}", url.PathEscape(ParameterValueToString(zoneIdValue, "zoneId")), -1) rrSetIdValue := "rrSetId" - path = strings.Replace(path, "{"+"rrSetId"+"}", url.PathEscape(ParameterValueToString(rrSetIdValue, "rrSetId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"rrSetId"+"}", url.PathEscape(ParameterValueToString(rrSetIdValue, "rrSetId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := RecordSetResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -625,29 +625,29 @@ func Test_dns_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" - zoneId := "zoneId" - rrSetId := "rrSetId" + projectId := projectIdValue + zoneId := zoneIdValue + rrSetId := rrSetIdValue resp, reqErr := apiClient.GetRecordSet(context.Background(), projectId, zoneId, rrSetId).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService GetZone", func(t *testing.T) { - path := "/v1/projects/{projectId}/zones/{zoneId}" + _apiUrlPath := "/v1/projects/{projectId}/zones/{zoneId}" projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) zoneIdValue := "zoneId" - path = strings.Replace(path, "{"+"zoneId"+"}", url.PathEscape(ParameterValueToString(zoneIdValue, "zoneId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"zoneId"+"}", url.PathEscape(ParameterValueToString(zoneIdValue, "zoneId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := ZoneResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -681,28 +681,28 @@ func Test_dns_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" - zoneId := "zoneId" + projectId := projectIdValue + zoneId := zoneIdValue resp, reqErr := apiClient.GetZone(context.Background(), projectId, zoneId).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService ImportRecordSets", func(t *testing.T) { - path := "/v1/projects/{projectId}/zones/{zoneId}/import" + _apiUrlPath := "/v1/projects/{projectId}/zones/{zoneId}/import" projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) zoneIdValue := "zoneId" - path = strings.Replace(path, "{"+"zoneId"+"}", url.PathEscape(ParameterValueToString(zoneIdValue, "zoneId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"zoneId"+"}", url.PathEscape(ParameterValueToString(zoneIdValue, "zoneId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := ImportRecordSetsResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -736,8 +736,8 @@ func Test_dns_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" - zoneId := "zoneId" + projectId := projectIdValue + zoneId := zoneIdValue importRecordSetsPayload := ImportRecordSetsPayload{} resp, reqErr := apiClient.ImportRecordSets(context.Background(), projectId, zoneId).ImportRecordSetsPayload(importRecordSetsPayload).Execute() @@ -745,20 +745,20 @@ func Test_dns_DefaultApiService(t *testing.T) { if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService ListLabels", func(t *testing.T) { - path := "/v1/projects/{projectId}/zones/{zoneId}/labels" + _apiUrlPath := "/v1/projects/{projectId}/zones/{zoneId}/labels" projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) zoneIdValue := "zoneId" - path = strings.Replace(path, "{"+"zoneId"+"}", url.PathEscape(ParameterValueToString(zoneIdValue, "zoneId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"zoneId"+"}", url.PathEscape(ParameterValueToString(zoneIdValue, "zoneId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := ListLabelsResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -792,28 +792,28 @@ func Test_dns_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" - zoneId := "zoneId" + projectId := projectIdValue + zoneId := zoneIdValue resp, reqErr := apiClient.ListLabels(context.Background(), projectId, zoneId).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService ListRecordSets", func(t *testing.T) { - path := "/v1/projects/{projectId}/zones/{zoneId}/rrsets" + _apiUrlPath := "/v1/projects/{projectId}/zones/{zoneId}/rrsets" projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) zoneIdValue := "zoneId" - path = strings.Replace(path, "{"+"zoneId"+"}", url.PathEscape(ParameterValueToString(zoneIdValue, "zoneId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"zoneId"+"}", url.PathEscape(ParameterValueToString(zoneIdValue, "zoneId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := ListRecordSetsResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -847,26 +847,26 @@ func Test_dns_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" - zoneId := "zoneId" + projectId := projectIdValue + zoneId := zoneIdValue resp, reqErr := apiClient.ListRecordSets(context.Background(), projectId, zoneId).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService ListZones", func(t *testing.T) { - path := "/v1/projects/{projectId}/zones" + _apiUrlPath := "/v1/projects/{projectId}/zones" projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := ListZonesResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -900,25 +900,25 @@ func Test_dns_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" + projectId := projectIdValue resp, reqErr := apiClient.ListZones(context.Background(), projectId).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService MoveZone", func(t *testing.T) { - path := "/v1/projects/{projectId}/move-zone" + _apiUrlPath := "/v1/projects/{projectId}/move-zone" projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := Message{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -952,7 +952,7 @@ func Test_dns_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" + projectId := projectIdValue moveZonePayload := MoveZonePayload{} resp, reqErr := apiClient.MoveZone(context.Background(), projectId).MoveZonePayload(moveZonePayload).Execute() @@ -960,22 +960,22 @@ func Test_dns_DefaultApiService(t *testing.T) { if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService PartialUpdateRecord", func(t *testing.T) { - path := "/v1/projects/{projectId}/zones/{zoneId}/rrsets/{rrSetId}/records" + _apiUrlPath := "/v1/projects/{projectId}/zones/{zoneId}/rrsets/{rrSetId}/records" projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) zoneIdValue := "zoneId" - path = strings.Replace(path, "{"+"zoneId"+"}", url.PathEscape(ParameterValueToString(zoneIdValue, "zoneId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"zoneId"+"}", url.PathEscape(ParameterValueToString(zoneIdValue, "zoneId")), -1) rrSetIdValue := "rrSetId" - path = strings.Replace(path, "{"+"rrSetId"+"}", url.PathEscape(ParameterValueToString(rrSetIdValue, "rrSetId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"rrSetId"+"}", url.PathEscape(ParameterValueToString(rrSetIdValue, "rrSetId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := Message{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -1009,9 +1009,9 @@ func Test_dns_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" - zoneId := "zoneId" - rrSetId := "rrSetId" + projectId := projectIdValue + zoneId := zoneIdValue + rrSetId := rrSetIdValue partialUpdateRecordPayload := PartialUpdateRecordPayload{} resp, reqErr := apiClient.PartialUpdateRecord(context.Background(), projectId, zoneId, rrSetId).PartialUpdateRecordPayload(partialUpdateRecordPayload).Execute() @@ -1019,22 +1019,22 @@ func Test_dns_DefaultApiService(t *testing.T) { if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService PartialUpdateRecordSet", func(t *testing.T) { - path := "/v1/projects/{projectId}/zones/{zoneId}/rrsets/{rrSetId}" + _apiUrlPath := "/v1/projects/{projectId}/zones/{zoneId}/rrsets/{rrSetId}" projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) zoneIdValue := "zoneId" - path = strings.Replace(path, "{"+"zoneId"+"}", url.PathEscape(ParameterValueToString(zoneIdValue, "zoneId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"zoneId"+"}", url.PathEscape(ParameterValueToString(zoneIdValue, "zoneId")), -1) rrSetIdValue := "rrSetId" - path = strings.Replace(path, "{"+"rrSetId"+"}", url.PathEscape(ParameterValueToString(rrSetIdValue, "rrSetId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"rrSetId"+"}", url.PathEscape(ParameterValueToString(rrSetIdValue, "rrSetId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := Message{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -1068,9 +1068,9 @@ func Test_dns_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" - zoneId := "zoneId" - rrSetId := "rrSetId" + projectId := projectIdValue + zoneId := zoneIdValue + rrSetId := rrSetIdValue partialUpdateRecordSetPayload := PartialUpdateRecordSetPayload{} resp, reqErr := apiClient.PartialUpdateRecordSet(context.Background(), projectId, zoneId, rrSetId).PartialUpdateRecordSetPayload(partialUpdateRecordSetPayload).Execute() @@ -1078,20 +1078,20 @@ func Test_dns_DefaultApiService(t *testing.T) { if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService PartialUpdateZone", func(t *testing.T) { - path := "/v1/projects/{projectId}/zones/{zoneId}" + _apiUrlPath := "/v1/projects/{projectId}/zones/{zoneId}" projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) zoneIdValue := "zoneId" - path = strings.Replace(path, "{"+"zoneId"+"}", url.PathEscape(ParameterValueToString(zoneIdValue, "zoneId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"zoneId"+"}", url.PathEscape(ParameterValueToString(zoneIdValue, "zoneId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := ZoneResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -1125,8 +1125,8 @@ func Test_dns_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" - zoneId := "zoneId" + projectId := projectIdValue + zoneId := zoneIdValue partialUpdateZonePayload := PartialUpdateZonePayload{} resp, reqErr := apiClient.PartialUpdateZone(context.Background(), projectId, zoneId).PartialUpdateZonePayload(partialUpdateZonePayload).Execute() @@ -1134,22 +1134,22 @@ func Test_dns_DefaultApiService(t *testing.T) { if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService RestoreRecordSet", func(t *testing.T) { - path := "/v1/projects/{projectId}/zones/{zoneId}/rrsets/{rrSetId}/restores" + _apiUrlPath := "/v1/projects/{projectId}/zones/{zoneId}/rrsets/{rrSetId}/restores" projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) zoneIdValue := "zoneId" - path = strings.Replace(path, "{"+"zoneId"+"}", url.PathEscape(ParameterValueToString(zoneIdValue, "zoneId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"zoneId"+"}", url.PathEscape(ParameterValueToString(zoneIdValue, "zoneId")), -1) rrSetIdValue := "rrSetId" - path = strings.Replace(path, "{"+"rrSetId"+"}", url.PathEscape(ParameterValueToString(rrSetIdValue, "rrSetId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"rrSetId"+"}", url.PathEscape(ParameterValueToString(rrSetIdValue, "rrSetId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := Message{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -1183,29 +1183,29 @@ func Test_dns_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" - zoneId := "zoneId" - rrSetId := "rrSetId" + projectId := projectIdValue + zoneId := zoneIdValue + rrSetId := rrSetIdValue resp, reqErr := apiClient.RestoreRecordSet(context.Background(), projectId, zoneId, rrSetId).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService RestoreZone", func(t *testing.T) { - path := "/v1/projects/{projectId}/zones/{zoneId}/restores" + _apiUrlPath := "/v1/projects/{projectId}/zones/{zoneId}/restores" projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) zoneIdValue := "zoneId" - path = strings.Replace(path, "{"+"zoneId"+"}", url.PathEscape(ParameterValueToString(zoneIdValue, "zoneId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"zoneId"+"}", url.PathEscape(ParameterValueToString(zoneIdValue, "zoneId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := Message{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -1239,28 +1239,28 @@ func Test_dns_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" - zoneId := "zoneId" + projectId := projectIdValue + zoneId := zoneIdValue resp, reqErr := apiClient.RestoreZone(context.Background(), projectId, zoneId).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService RetrieveZone", func(t *testing.T) { - path := "/v1/projects/{projectId}/zones/{zoneId}/retrieve" + _apiUrlPath := "/v1/projects/{projectId}/zones/{zoneId}/retrieve" projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) zoneIdValue := "zoneId" - path = strings.Replace(path, "{"+"zoneId"+"}", url.PathEscape(ParameterValueToString(zoneIdValue, "zoneId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"zoneId"+"}", url.PathEscape(ParameterValueToString(zoneIdValue, "zoneId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := Message{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -1294,28 +1294,28 @@ func Test_dns_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" - zoneId := "zoneId" + projectId := projectIdValue + zoneId := zoneIdValue resp, reqErr := apiClient.RetrieveZone(context.Background(), projectId, zoneId).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) t.Run("Test DefaultApiService ValidateMoveCode", func(t *testing.T) { - path := "/v1/projects/{projectId}/zones/{zoneId}/move-code-validation" + _apiUrlPath := "/v1/projects/{projectId}/zones/{zoneId}/move-code-validation" projectIdValue := "projectId" - path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) zoneIdValue := "zoneId" - path = strings.Replace(path, "{"+"zoneId"+"}", url.PathEscape(ParameterValueToString(zoneIdValue, "zoneId")), -1) + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"zoneId"+"}", url.PathEscape(ParameterValueToString(zoneIdValue, "zoneId")), -1) testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { data := Message{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) @@ -1349,8 +1349,8 @@ func Test_dns_DefaultApiService(t *testing.T) { t.Fatalf("creating API client: %v", err) } - projectId := "projectId" - zoneId := "zoneId" + projectId := projectIdValue + zoneId := zoneIdValue validateMoveCodePayload := ValidateMoveCodePayload{} resp, reqErr := apiClient.ValidateMoveCode(context.Background(), projectId, zoneId).ValidateMoveCodePayload(validateMoveCodePayload).Execute() @@ -1358,7 +1358,7 @@ func Test_dns_DefaultApiService(t *testing.T) { if reqErr != nil { t.Fatalf("error in call: %v", reqErr) } - if resp == nil { + if IsNil(resp) { t.Fatalf("response not present") } }) diff --git a/services/dns/model_clone_zone_payload.go b/services/dns/model_clone_zone_payload.go index 8963ccd4e..7c8c2e898 100644 --- a/services/dns/model_clone_zone_payload.go +++ b/services/dns/model_clone_zone_payload.go @@ -17,17 +17,100 @@ import ( // checks if the CloneZonePayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CloneZonePayload{} +/* + types and functions for adjustRecords +*/ + +// isBoolean +type CloneZonePayloadgetAdjustRecordsAttributeType = *bool +type CloneZonePayloadgetAdjustRecordsArgType = bool +type CloneZonePayloadgetAdjustRecordsRetType = bool + +func getCloneZonePayloadgetAdjustRecordsAttributeTypeOk(arg CloneZonePayloadgetAdjustRecordsAttributeType) (ret CloneZonePayloadgetAdjustRecordsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCloneZonePayloadgetAdjustRecordsAttributeType(arg *CloneZonePayloadgetAdjustRecordsAttributeType, val CloneZonePayloadgetAdjustRecordsRetType) { + *arg = &val +} + +/* + types and functions for description +*/ + +// isNotNullableString +type CloneZonePayloadGetDescriptionAttributeType = *string + +func getCloneZonePayloadGetDescriptionAttributeTypeOk(arg CloneZonePayloadGetDescriptionAttributeType) (ret CloneZonePayloadGetDescriptionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCloneZonePayloadGetDescriptionAttributeType(arg *CloneZonePayloadGetDescriptionAttributeType, val CloneZonePayloadGetDescriptionRetType) { + *arg = &val +} + +type CloneZonePayloadGetDescriptionArgType = string +type CloneZonePayloadGetDescriptionRetType = string + +/* + types and functions for dnsName +*/ + +// isNotNullableString +type CloneZonePayloadGetDnsNameAttributeType = *string + +func getCloneZonePayloadGetDnsNameAttributeTypeOk(arg CloneZonePayloadGetDnsNameAttributeType) (ret CloneZonePayloadGetDnsNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCloneZonePayloadGetDnsNameAttributeType(arg *CloneZonePayloadGetDnsNameAttributeType, val CloneZonePayloadGetDnsNameRetType) { + *arg = &val +} + +type CloneZonePayloadGetDnsNameArgType = string +type CloneZonePayloadGetDnsNameRetType = string + +/* + types and functions for name +*/ + +// isNotNullableString +type CloneZonePayloadGetNameAttributeType = *string + +func getCloneZonePayloadGetNameAttributeTypeOk(arg CloneZonePayloadGetNameAttributeType) (ret CloneZonePayloadGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCloneZonePayloadGetNameAttributeType(arg *CloneZonePayloadGetNameAttributeType, val CloneZonePayloadGetNameRetType) { + *arg = &val +} + +type CloneZonePayloadGetNameArgType = string +type CloneZonePayloadGetNameRetType = string + // CloneZonePayload metadata to clone a zone. type CloneZonePayload struct { // Adjust record set content and replace the dns name of the original zone with the new dns name of the cloned zone - AdjustRecords *bool `json:"adjustRecords,omitempty"` + AdjustRecords CloneZonePayloadgetAdjustRecordsAttributeType `json:"adjustRecords,omitempty"` // New Description for the cloned zone. Leave empty to use the same description as the original zone - Description *string `json:"description,omitempty"` + Description CloneZonePayloadGetDescriptionAttributeType `json:"description,omitempty"` // DnsName is the dns name of the zone to clone // REQUIRED - DnsName *string `json:"dnsName"` + DnsName CloneZonePayloadGetDnsNameAttributeType `json:"dnsName"` // New Name for the cloned zone. Leave empty to use the same name as the original zone - Name *string `json:"name,omitempty"` + Name CloneZonePayloadGetNameAttributeType `json:"name,omitempty"` } type _CloneZonePayload CloneZonePayload @@ -36,9 +119,9 @@ type _CloneZonePayload CloneZonePayload // 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 NewCloneZonePayload(dnsName *string) *CloneZonePayload { +func NewCloneZonePayload(dnsName CloneZonePayloadGetDnsNameArgType) *CloneZonePayload { this := CloneZonePayload{} - this.DnsName = dnsName + setCloneZonePayloadGetDnsNameAttributeType(&this.DnsName, dnsName) return &this } @@ -51,136 +134,104 @@ func NewCloneZonePayloadWithDefaults() *CloneZonePayload { } // GetAdjustRecords returns the AdjustRecords field value if set, zero value otherwise. -func (o *CloneZonePayload) GetAdjustRecords() *bool { - if o == nil || IsNil(o.AdjustRecords) { - var ret *bool - return ret - } - return o.AdjustRecords +func (o *CloneZonePayload) GetAdjustRecords() (res CloneZonePayloadgetAdjustRecordsRetType) { + res, _ = o.GetAdjustRecordsOk() + return } // GetAdjustRecordsOk returns a tuple with the AdjustRecords field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CloneZonePayload) GetAdjustRecordsOk() (*bool, bool) { - if o == nil || IsNil(o.AdjustRecords) { - return nil, false - } - return o.AdjustRecords, true +func (o *CloneZonePayload) GetAdjustRecordsOk() (ret CloneZonePayloadgetAdjustRecordsRetType, ok bool) { + return getCloneZonePayloadgetAdjustRecordsAttributeTypeOk(o.AdjustRecords) } // HasAdjustRecords returns a boolean if a field has been set. func (o *CloneZonePayload) HasAdjustRecords() bool { - if o != nil && !IsNil(o.AdjustRecords) { - return true - } - - return false + _, ok := o.GetAdjustRecordsOk() + return ok } // SetAdjustRecords gets a reference to the given bool and assigns it to the AdjustRecords field. -func (o *CloneZonePayload) SetAdjustRecords(v *bool) { - o.AdjustRecords = v +func (o *CloneZonePayload) SetAdjustRecords(v CloneZonePayloadgetAdjustRecordsRetType) { + setCloneZonePayloadgetAdjustRecordsAttributeType(&o.AdjustRecords, v) } // GetDescription returns the Description field value if set, zero value otherwise. -func (o *CloneZonePayload) GetDescription() *string { - if o == nil || IsNil(o.Description) { - var ret *string - return ret - } - return o.Description +func (o *CloneZonePayload) GetDescription() (res CloneZonePayloadGetDescriptionRetType) { + res, _ = o.GetDescriptionOk() + return } // 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 *CloneZonePayload) GetDescriptionOk() (*string, bool) { - if o == nil || IsNil(o.Description) { - return nil, false - } - return o.Description, true +func (o *CloneZonePayload) GetDescriptionOk() (ret CloneZonePayloadGetDescriptionRetType, ok bool) { + return getCloneZonePayloadGetDescriptionAttributeTypeOk(o.Description) } // HasDescription returns a boolean if a field has been set. func (o *CloneZonePayload) HasDescription() bool { - if o != nil && !IsNil(o.Description) { - return true - } - - return false + _, ok := o.GetDescriptionOk() + return ok } // SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *CloneZonePayload) SetDescription(v *string) { - o.Description = v +func (o *CloneZonePayload) SetDescription(v CloneZonePayloadGetDescriptionRetType) { + setCloneZonePayloadGetDescriptionAttributeType(&o.Description, v) } // GetDnsName returns the DnsName field value -func (o *CloneZonePayload) GetDnsName() *string { - if o == nil || IsNil(o.DnsName) { - var ret *string - return ret - } - - return o.DnsName +func (o *CloneZonePayload) GetDnsName() (ret CloneZonePayloadGetDnsNameRetType) { + ret, _ = o.GetDnsNameOk() + return ret } // GetDnsNameOk returns a tuple with the DnsName field value // and a boolean to check if the value has been set. -func (o *CloneZonePayload) GetDnsNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.DnsName, true +func (o *CloneZonePayload) GetDnsNameOk() (ret CloneZonePayloadGetDnsNameRetType, ok bool) { + return getCloneZonePayloadGetDnsNameAttributeTypeOk(o.DnsName) } // SetDnsName sets field value -func (o *CloneZonePayload) SetDnsName(v *string) { - o.DnsName = v +func (o *CloneZonePayload) SetDnsName(v CloneZonePayloadGetDnsNameRetType) { + setCloneZonePayloadGetDnsNameAttributeType(&o.DnsName, v) } // GetName returns the Name field value if set, zero value otherwise. -func (o *CloneZonePayload) GetName() *string { - if o == nil || IsNil(o.Name) { - var ret *string - return ret - } - return o.Name +func (o *CloneZonePayload) GetName() (res CloneZonePayloadGetNameRetType) { + res, _ = o.GetNameOk() + return } // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CloneZonePayload) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true +func (o *CloneZonePayload) GetNameOk() (ret CloneZonePayloadGetNameRetType, ok bool) { + return getCloneZonePayloadGetNameAttributeTypeOk(o.Name) } // HasName returns a boolean if a field has been set. func (o *CloneZonePayload) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false + _, ok := o.GetNameOk() + return ok } // SetName gets a reference to the given string and assigns it to the Name field. -func (o *CloneZonePayload) SetName(v *string) { - o.Name = v +func (o *CloneZonePayload) SetName(v CloneZonePayloadGetNameRetType) { + setCloneZonePayloadGetNameAttributeType(&o.Name, v) } func (o CloneZonePayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.AdjustRecords) { - toSerialize["adjustRecords"] = o.AdjustRecords + if val, ok := getCloneZonePayloadgetAdjustRecordsAttributeTypeOk(o.AdjustRecords); ok { + toSerialize["AdjustRecords"] = val + } + if val, ok := getCloneZonePayloadGetDescriptionAttributeTypeOk(o.Description); ok { + toSerialize["Description"] = val } - if !IsNil(o.Description) { - toSerialize["description"] = o.Description + if val, ok := getCloneZonePayloadGetDnsNameAttributeTypeOk(o.DnsName); ok { + toSerialize["DnsName"] = val } - toSerialize["dnsName"] = o.DnsName - if !IsNil(o.Name) { - toSerialize["name"] = o.Name + if val, ok := getCloneZonePayloadGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val } return toSerialize, nil } diff --git a/services/dns/model_create_label_payload.go b/services/dns/model_create_label_payload.go index ffdb3b336..89dc1f336 100644 --- a/services/dns/model_create_label_payload.go +++ b/services/dns/model_create_label_payload.go @@ -17,12 +17,54 @@ import ( // checks if the CreateLabelPayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CreateLabelPayload{} +/* + types and functions for key +*/ + +// isNotNullableString +type CreateLabelPayloadGetKeyAttributeType = *string + +func getCreateLabelPayloadGetKeyAttributeTypeOk(arg CreateLabelPayloadGetKeyAttributeType) (ret CreateLabelPayloadGetKeyRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateLabelPayloadGetKeyAttributeType(arg *CreateLabelPayloadGetKeyAttributeType, val CreateLabelPayloadGetKeyRetType) { + *arg = &val +} + +type CreateLabelPayloadGetKeyArgType = string +type CreateLabelPayloadGetKeyRetType = string + +/* + types and functions for value +*/ + +// isNotNullableString +type CreateLabelPayloadGetValueAttributeType = *string + +func getCreateLabelPayloadGetValueAttributeTypeOk(arg CreateLabelPayloadGetValueAttributeType) (ret CreateLabelPayloadGetValueRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateLabelPayloadGetValueAttributeType(arg *CreateLabelPayloadGetValueAttributeType, val CreateLabelPayloadGetValueRetType) { + *arg = &val +} + +type CreateLabelPayloadGetValueArgType = string +type CreateLabelPayloadGetValueRetType = string + // CreateLabelPayload struct for CreateLabelPayload type CreateLabelPayload struct { // REQUIRED - Key *string `json:"key"` + Key CreateLabelPayloadGetKeyAttributeType `json:"key"` // REQUIRED - Value *string `json:"value"` + Value CreateLabelPayloadGetValueAttributeType `json:"value"` } type _CreateLabelPayload CreateLabelPayload @@ -31,10 +73,10 @@ type _CreateLabelPayload CreateLabelPayload // 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 NewCreateLabelPayload(key *string, value *string) *CreateLabelPayload { +func NewCreateLabelPayload(key CreateLabelPayloadGetKeyArgType, value CreateLabelPayloadGetValueArgType) *CreateLabelPayload { this := CreateLabelPayload{} - this.Key = key - this.Value = value + setCreateLabelPayloadGetKeyAttributeType(&this.Key, key) + setCreateLabelPayloadGetValueAttributeType(&this.Value, value) return &this } @@ -47,57 +89,47 @@ func NewCreateLabelPayloadWithDefaults() *CreateLabelPayload { } // GetKey returns the Key field value -func (o *CreateLabelPayload) GetKey() *string { - if o == nil || IsNil(o.Key) { - var ret *string - return ret - } - - return o.Key +func (o *CreateLabelPayload) GetKey() (ret CreateLabelPayloadGetKeyRetType) { + ret, _ = o.GetKeyOk() + return ret } // GetKeyOk returns a tuple with the Key field value // and a boolean to check if the value has been set. -func (o *CreateLabelPayload) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Key, true +func (o *CreateLabelPayload) GetKeyOk() (ret CreateLabelPayloadGetKeyRetType, ok bool) { + return getCreateLabelPayloadGetKeyAttributeTypeOk(o.Key) } // SetKey sets field value -func (o *CreateLabelPayload) SetKey(v *string) { - o.Key = v +func (o *CreateLabelPayload) SetKey(v CreateLabelPayloadGetKeyRetType) { + setCreateLabelPayloadGetKeyAttributeType(&o.Key, v) } // GetValue returns the Value field value -func (o *CreateLabelPayload) GetValue() *string { - if o == nil || IsNil(o.Value) { - var ret *string - return ret - } - - return o.Value +func (o *CreateLabelPayload) GetValue() (ret CreateLabelPayloadGetValueRetType) { + ret, _ = o.GetValueOk() + return ret } // GetValueOk returns a tuple with the Value field value // and a boolean to check if the value has been set. -func (o *CreateLabelPayload) GetValueOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Value, true +func (o *CreateLabelPayload) GetValueOk() (ret CreateLabelPayloadGetValueRetType, ok bool) { + return getCreateLabelPayloadGetValueAttributeTypeOk(o.Value) } // SetValue sets field value -func (o *CreateLabelPayload) SetValue(v *string) { - o.Value = v +func (o *CreateLabelPayload) SetValue(v CreateLabelPayloadGetValueRetType) { + setCreateLabelPayloadGetValueAttributeType(&o.Value, v) } func (o CreateLabelPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - toSerialize["value"] = o.Value + if val, ok := getCreateLabelPayloadGetKeyAttributeTypeOk(o.Key); ok { + toSerialize["Key"] = val + } + if val, ok := getCreateLabelPayloadGetValueAttributeTypeOk(o.Value); ok { + toSerialize["Value"] = val + } return toSerialize, nil } diff --git a/services/dns/model_create_label_response.go b/services/dns/model_create_label_response.go index 13e4d0c62..e1f57a30f 100644 --- a/services/dns/model_create_label_response.go +++ b/services/dns/model_create_label_response.go @@ -17,10 +17,51 @@ import ( // checks if the CreateLabelResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CreateLabelResponse{} +/* + types and functions for label +*/ + +// isModel +type CreateLabelResponseGetLabelAttributeType = *Label +type CreateLabelResponseGetLabelArgType = Label +type CreateLabelResponseGetLabelRetType = Label + +func getCreateLabelResponseGetLabelAttributeTypeOk(arg CreateLabelResponseGetLabelAttributeType) (ret CreateLabelResponseGetLabelRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateLabelResponseGetLabelAttributeType(arg *CreateLabelResponseGetLabelAttributeType, val CreateLabelResponseGetLabelRetType) { + *arg = &val +} + +/* + types and functions for message +*/ + +// isNotNullableString +type CreateLabelResponseGetMessageAttributeType = *string + +func getCreateLabelResponseGetMessageAttributeTypeOk(arg CreateLabelResponseGetMessageAttributeType) (ret CreateLabelResponseGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateLabelResponseGetMessageAttributeType(arg *CreateLabelResponseGetMessageAttributeType, val CreateLabelResponseGetMessageRetType) { + *arg = &val +} + +type CreateLabelResponseGetMessageArgType = string +type CreateLabelResponseGetMessageRetType = string + // CreateLabelResponse ResponseUpsertLabel. type CreateLabelResponse struct { - Label *Label `json:"label,omitempty"` - Message *string `json:"message,omitempty"` + Label CreateLabelResponseGetLabelAttributeType `json:"label,omitempty"` + Message CreateLabelResponseGetMessageAttributeType `json:"message,omitempty"` } // NewCreateLabelResponse instantiates a new CreateLabelResponse object @@ -41,76 +82,58 @@ func NewCreateLabelResponseWithDefaults() *CreateLabelResponse { } // GetLabel returns the Label field value if set, zero value otherwise. -func (o *CreateLabelResponse) GetLabel() *Label { - if o == nil || IsNil(o.Label) { - var ret *Label - return ret - } - return o.Label +func (o *CreateLabelResponse) GetLabel() (res CreateLabelResponseGetLabelRetType) { + res, _ = o.GetLabelOk() + return } // GetLabelOk returns a tuple with the Label field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateLabelResponse) GetLabelOk() (*Label, bool) { - if o == nil || IsNil(o.Label) { - return nil, false - } - return o.Label, true +func (o *CreateLabelResponse) GetLabelOk() (ret CreateLabelResponseGetLabelRetType, ok bool) { + return getCreateLabelResponseGetLabelAttributeTypeOk(o.Label) } // HasLabel returns a boolean if a field has been set. func (o *CreateLabelResponse) HasLabel() bool { - if o != nil && !IsNil(o.Label) { - return true - } - - return false + _, ok := o.GetLabelOk() + return ok } // SetLabel gets a reference to the given Label and assigns it to the Label field. -func (o *CreateLabelResponse) SetLabel(v *Label) { - o.Label = v +func (o *CreateLabelResponse) SetLabel(v CreateLabelResponseGetLabelRetType) { + setCreateLabelResponseGetLabelAttributeType(&o.Label, v) } // GetMessage returns the Message field value if set, zero value otherwise. -func (o *CreateLabelResponse) GetMessage() *string { - if o == nil || IsNil(o.Message) { - var ret *string - return ret - } - return o.Message +func (o *CreateLabelResponse) GetMessage() (res CreateLabelResponseGetMessageRetType) { + res, _ = o.GetMessageOk() + return } // GetMessageOk returns a tuple with the Message field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateLabelResponse) GetMessageOk() (*string, bool) { - if o == nil || IsNil(o.Message) { - return nil, false - } - return o.Message, true +func (o *CreateLabelResponse) GetMessageOk() (ret CreateLabelResponseGetMessageRetType, ok bool) { + return getCreateLabelResponseGetMessageAttributeTypeOk(o.Message) } // HasMessage returns a boolean if a field has been set. func (o *CreateLabelResponse) HasMessage() bool { - if o != nil && !IsNil(o.Message) { - return true - } - - return false + _, ok := o.GetMessageOk() + return ok } // SetMessage gets a reference to the given string and assigns it to the Message field. -func (o *CreateLabelResponse) SetMessage(v *string) { - o.Message = v +func (o *CreateLabelResponse) SetMessage(v CreateLabelResponseGetMessageRetType) { + setCreateLabelResponseGetMessageAttributeType(&o.Message, v) } func (o CreateLabelResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Label) { - toSerialize["label"] = o.Label + if val, ok := getCreateLabelResponseGetLabelAttributeTypeOk(o.Label); ok { + toSerialize["Label"] = val } - if !IsNil(o.Message) { - toSerialize["message"] = o.Message + if val, ok := getCreateLabelResponseGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val } return toSerialize, nil } diff --git a/services/dns/model_create_record_set_payload.go b/services/dns/model_create_record_set_payload.go index 8402f14a4..d4b7b74a7 100644 --- a/services/dns/model_create_record_set_payload.go +++ b/services/dns/model_create_record_set_payload.go @@ -17,21 +17,124 @@ import ( // checks if the CreateRecordSetPayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CreateRecordSetPayload{} +/* + types and functions for comment +*/ + +// isNotNullableString +type CreateRecordSetPayloadGetCommentAttributeType = *string + +func getCreateRecordSetPayloadGetCommentAttributeTypeOk(arg CreateRecordSetPayloadGetCommentAttributeType) (ret CreateRecordSetPayloadGetCommentRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateRecordSetPayloadGetCommentAttributeType(arg *CreateRecordSetPayloadGetCommentAttributeType, val CreateRecordSetPayloadGetCommentRetType) { + *arg = &val +} + +type CreateRecordSetPayloadGetCommentArgType = string +type CreateRecordSetPayloadGetCommentRetType = string + +/* + types and functions for name +*/ + +// isNotNullableString +type CreateRecordSetPayloadGetNameAttributeType = *string + +func getCreateRecordSetPayloadGetNameAttributeTypeOk(arg CreateRecordSetPayloadGetNameAttributeType) (ret CreateRecordSetPayloadGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateRecordSetPayloadGetNameAttributeType(arg *CreateRecordSetPayloadGetNameAttributeType, val CreateRecordSetPayloadGetNameRetType) { + *arg = &val +} + +type CreateRecordSetPayloadGetNameArgType = string +type CreateRecordSetPayloadGetNameRetType = string + +/* + types and functions for records +*/ + +// isArray +type CreateRecordSetPayloadGetRecordsAttributeType = *[]RecordPayload +type CreateRecordSetPayloadGetRecordsArgType = []RecordPayload +type CreateRecordSetPayloadGetRecordsRetType = []RecordPayload + +func getCreateRecordSetPayloadGetRecordsAttributeTypeOk(arg CreateRecordSetPayloadGetRecordsAttributeType) (ret CreateRecordSetPayloadGetRecordsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateRecordSetPayloadGetRecordsAttributeType(arg *CreateRecordSetPayloadGetRecordsAttributeType, val CreateRecordSetPayloadGetRecordsRetType) { + *arg = &val +} + +/* + types and functions for ttl +*/ + +// isInteger +type CreateRecordSetPayloadGetTtlAttributeType = *int64 +type CreateRecordSetPayloadGetTtlArgType = int64 +type CreateRecordSetPayloadGetTtlRetType = int64 + +func getCreateRecordSetPayloadGetTtlAttributeTypeOk(arg CreateRecordSetPayloadGetTtlAttributeType) (ret CreateRecordSetPayloadGetTtlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateRecordSetPayloadGetTtlAttributeType(arg *CreateRecordSetPayloadGetTtlAttributeType, val CreateRecordSetPayloadGetTtlRetType) { + *arg = &val +} + +/* + types and functions for type +*/ + +// isEnumRef +type CreateRecordSetPayloadGetTypeAttributeType = *string +type CreateRecordSetPayloadGetTypeArgType = string +type CreateRecordSetPayloadGetTypeRetType = string + +func getCreateRecordSetPayloadGetTypeAttributeTypeOk(arg CreateRecordSetPayloadGetTypeAttributeType) (ret CreateRecordSetPayloadGetTypeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateRecordSetPayloadGetTypeAttributeType(arg *CreateRecordSetPayloadGetTypeAttributeType, val CreateRecordSetPayloadGetTypeRetType) { + *arg = &val +} + // CreateRecordSetPayload RRSetPost for rr set info. type CreateRecordSetPayload struct { // user comment - Comment *string `json:"comment,omitempty"` + Comment CreateRecordSetPayloadGetCommentAttributeType `json:"comment,omitempty"` // name of the record which should be a valid domain according to rfc1035 Section 2.3.4 // REQUIRED - Name *string `json:"name"` + Name CreateRecordSetPayloadGetNameAttributeType `json:"name"` // records // REQUIRED - Records *[]RecordPayload `json:"records"` + Records CreateRecordSetPayloadGetRecordsAttributeType `json:"records"` // time to live. If nothing provided we will set the zone ttl. - Ttl *int64 `json:"ttl,omitempty"` + // Can be cast to int32 without loss of precision. + Ttl CreateRecordSetPayloadGetTtlAttributeType `json:"ttl,omitempty"` // record set type // REQUIRED - Type *string `json:"type"` + Type CreateRecordSetPayloadGetTypeAttributeType `json:"type"` } type _CreateRecordSetPayload CreateRecordSetPayload @@ -40,11 +143,11 @@ type _CreateRecordSetPayload CreateRecordSetPayload // 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 NewCreateRecordSetPayload(name *string, records *[]RecordPayload, type_ *string) *CreateRecordSetPayload { +func NewCreateRecordSetPayload(name CreateRecordSetPayloadGetNameArgType, records CreateRecordSetPayloadGetRecordsArgType, type_ CreateRecordSetPayloadGetTypeArgType) *CreateRecordSetPayload { this := CreateRecordSetPayload{} - this.Name = name - this.Records = records - this.Type = type_ + setCreateRecordSetPayloadGetNameAttributeType(&this.Name, name) + setCreateRecordSetPayloadGetRecordsAttributeType(&this.Records, records) + setCreateRecordSetPayloadGetTypeAttributeType(&this.Type, type_) return &this } @@ -57,152 +160,119 @@ func NewCreateRecordSetPayloadWithDefaults() *CreateRecordSetPayload { } // GetComment returns the Comment field value if set, zero value otherwise. -func (o *CreateRecordSetPayload) GetComment() *string { - if o == nil || IsNil(o.Comment) { - var ret *string - return ret - } - return o.Comment +func (o *CreateRecordSetPayload) GetComment() (res CreateRecordSetPayloadGetCommentRetType) { + res, _ = o.GetCommentOk() + return } // GetCommentOk returns a tuple with the Comment field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateRecordSetPayload) GetCommentOk() (*string, bool) { - if o == nil || IsNil(o.Comment) { - return nil, false - } - return o.Comment, true +func (o *CreateRecordSetPayload) GetCommentOk() (ret CreateRecordSetPayloadGetCommentRetType, ok bool) { + return getCreateRecordSetPayloadGetCommentAttributeTypeOk(o.Comment) } // HasComment returns a boolean if a field has been set. func (o *CreateRecordSetPayload) HasComment() bool { - if o != nil && !IsNil(o.Comment) { - return true - } - - return false + _, ok := o.GetCommentOk() + return ok } // SetComment gets a reference to the given string and assigns it to the Comment field. -func (o *CreateRecordSetPayload) SetComment(v *string) { - o.Comment = v +func (o *CreateRecordSetPayload) SetComment(v CreateRecordSetPayloadGetCommentRetType) { + setCreateRecordSetPayloadGetCommentAttributeType(&o.Comment, v) } // GetName returns the Name field value -func (o *CreateRecordSetPayload) GetName() *string { - if o == nil || IsNil(o.Name) { - var ret *string - return ret - } - - return o.Name +func (o *CreateRecordSetPayload) GetName() (ret CreateRecordSetPayloadGetNameRetType) { + ret, _ = o.GetNameOk() + return ret } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. -func (o *CreateRecordSetPayload) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Name, true +func (o *CreateRecordSetPayload) GetNameOk() (ret CreateRecordSetPayloadGetNameRetType, ok bool) { + return getCreateRecordSetPayloadGetNameAttributeTypeOk(o.Name) } // SetName sets field value -func (o *CreateRecordSetPayload) SetName(v *string) { - o.Name = v +func (o *CreateRecordSetPayload) SetName(v CreateRecordSetPayloadGetNameRetType) { + setCreateRecordSetPayloadGetNameAttributeType(&o.Name, v) } // GetRecords returns the Records field value -func (o *CreateRecordSetPayload) GetRecords() *[]RecordPayload { - if o == nil || IsNil(o.Records) { - var ret *[]RecordPayload - return ret - } - - return o.Records +func (o *CreateRecordSetPayload) GetRecords() (ret CreateRecordSetPayloadGetRecordsRetType) { + ret, _ = o.GetRecordsOk() + return ret } // GetRecordsOk returns a tuple with the Records field value // and a boolean to check if the value has been set. -func (o *CreateRecordSetPayload) GetRecordsOk() (*[]RecordPayload, bool) { - if o == nil { - return nil, false - } - return o.Records, true +func (o *CreateRecordSetPayload) GetRecordsOk() (ret CreateRecordSetPayloadGetRecordsRetType, ok bool) { + return getCreateRecordSetPayloadGetRecordsAttributeTypeOk(o.Records) } // SetRecords sets field value -func (o *CreateRecordSetPayload) SetRecords(v *[]RecordPayload) { - o.Records = v +func (o *CreateRecordSetPayload) SetRecords(v CreateRecordSetPayloadGetRecordsRetType) { + setCreateRecordSetPayloadGetRecordsAttributeType(&o.Records, v) } // GetTtl returns the Ttl field value if set, zero value otherwise. -func (o *CreateRecordSetPayload) GetTtl() *int64 { - if o == nil || IsNil(o.Ttl) { - var ret *int64 - return ret - } - return o.Ttl +func (o *CreateRecordSetPayload) GetTtl() (res CreateRecordSetPayloadGetTtlRetType) { + res, _ = o.GetTtlOk() + return } // GetTtlOk returns a tuple with the Ttl field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateRecordSetPayload) GetTtlOk() (*int64, bool) { - if o == nil || IsNil(o.Ttl) { - return nil, false - } - return o.Ttl, true +func (o *CreateRecordSetPayload) GetTtlOk() (ret CreateRecordSetPayloadGetTtlRetType, ok bool) { + return getCreateRecordSetPayloadGetTtlAttributeTypeOk(o.Ttl) } // HasTtl returns a boolean if a field has been set. func (o *CreateRecordSetPayload) HasTtl() bool { - if o != nil && !IsNil(o.Ttl) { - return true - } - - return false + _, ok := o.GetTtlOk() + return ok } // SetTtl gets a reference to the given int64 and assigns it to the Ttl field. -func (o *CreateRecordSetPayload) SetTtl(v *int64) { - o.Ttl = v +func (o *CreateRecordSetPayload) SetTtl(v CreateRecordSetPayloadGetTtlRetType) { + setCreateRecordSetPayloadGetTtlAttributeType(&o.Ttl, v) } // GetType returns the Type field value -func (o *CreateRecordSetPayload) GetType() *string { - if o == nil || IsNil(o.Type) { - var ret *string - return ret - } - - return o.Type +func (o *CreateRecordSetPayload) GetType() (ret CreateRecordSetPayloadGetTypeRetType) { + ret, _ = o.GetTypeOk() + return ret } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. -func (o *CreateRecordSetPayload) GetTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Type, true +func (o *CreateRecordSetPayload) GetTypeOk() (ret CreateRecordSetPayloadGetTypeRetType, ok bool) { + return getCreateRecordSetPayloadGetTypeAttributeTypeOk(o.Type) } // SetType sets field value -func (o *CreateRecordSetPayload) SetType(v *string) { - o.Type = v +func (o *CreateRecordSetPayload) SetType(v CreateRecordSetPayloadGetTypeRetType) { + setCreateRecordSetPayloadGetTypeAttributeType(&o.Type, v) } func (o CreateRecordSetPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Comment) { - toSerialize["comment"] = o.Comment + if val, ok := getCreateRecordSetPayloadGetCommentAttributeTypeOk(o.Comment); ok { + toSerialize["Comment"] = val + } + if val, ok := getCreateRecordSetPayloadGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val + } + if val, ok := getCreateRecordSetPayloadGetRecordsAttributeTypeOk(o.Records); ok { + toSerialize["Records"] = val + } + if val, ok := getCreateRecordSetPayloadGetTtlAttributeTypeOk(o.Ttl); ok { + toSerialize["Ttl"] = val } - toSerialize["name"] = o.Name - toSerialize["records"] = o.Records - if !IsNil(o.Ttl) { - toSerialize["ttl"] = o.Ttl + if val, ok := getCreateRecordSetPayloadGetTypeAttributeTypeOk(o.Type); ok { + toSerialize["Type"] = val } - toSerialize["type"] = o.Type return toSerialize, nil } diff --git a/services/dns/model_create_zone_payload.go b/services/dns/model_create_zone_payload.go index 47fa47511..12c17bc22 100644 --- a/services/dns/model_create_zone_payload.go +++ b/services/dns/model_create_zone_payload.go @@ -17,37 +17,327 @@ import ( // checks if the CreateZonePayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CreateZonePayload{} +/* + types and functions for acl +*/ + +// isNotNullableString +type CreateZonePayloadGetAclAttributeType = *string + +func getCreateZonePayloadGetAclAttributeTypeOk(arg CreateZonePayloadGetAclAttributeType) (ret CreateZonePayloadGetAclRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateZonePayloadGetAclAttributeType(arg *CreateZonePayloadGetAclAttributeType, val CreateZonePayloadGetAclRetType) { + *arg = &val +} + +type CreateZonePayloadGetAclArgType = string +type CreateZonePayloadGetAclRetType = string + +/* + types and functions for contactEmail +*/ + +// isNotNullableString +type CreateZonePayloadGetContactEmailAttributeType = *string + +func getCreateZonePayloadGetContactEmailAttributeTypeOk(arg CreateZonePayloadGetContactEmailAttributeType) (ret CreateZonePayloadGetContactEmailRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateZonePayloadGetContactEmailAttributeType(arg *CreateZonePayloadGetContactEmailAttributeType, val CreateZonePayloadGetContactEmailRetType) { + *arg = &val +} + +type CreateZonePayloadGetContactEmailArgType = string +type CreateZonePayloadGetContactEmailRetType = string + +/* + types and functions for defaultTTL +*/ + +// isInteger +type CreateZonePayloadGetDefaultTTLAttributeType = *int64 +type CreateZonePayloadGetDefaultTTLArgType = int64 +type CreateZonePayloadGetDefaultTTLRetType = int64 + +func getCreateZonePayloadGetDefaultTTLAttributeTypeOk(arg CreateZonePayloadGetDefaultTTLAttributeType) (ret CreateZonePayloadGetDefaultTTLRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateZonePayloadGetDefaultTTLAttributeType(arg *CreateZonePayloadGetDefaultTTLAttributeType, val CreateZonePayloadGetDefaultTTLRetType) { + *arg = &val +} + +/* + types and functions for description +*/ + +// isNotNullableString +type CreateZonePayloadGetDescriptionAttributeType = *string + +func getCreateZonePayloadGetDescriptionAttributeTypeOk(arg CreateZonePayloadGetDescriptionAttributeType) (ret CreateZonePayloadGetDescriptionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateZonePayloadGetDescriptionAttributeType(arg *CreateZonePayloadGetDescriptionAttributeType, val CreateZonePayloadGetDescriptionRetType) { + *arg = &val +} + +type CreateZonePayloadGetDescriptionArgType = string +type CreateZonePayloadGetDescriptionRetType = string + +/* + types and functions for dnsName +*/ + +// isNotNullableString +type CreateZonePayloadGetDnsNameAttributeType = *string + +func getCreateZonePayloadGetDnsNameAttributeTypeOk(arg CreateZonePayloadGetDnsNameAttributeType) (ret CreateZonePayloadGetDnsNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateZonePayloadGetDnsNameAttributeType(arg *CreateZonePayloadGetDnsNameAttributeType, val CreateZonePayloadGetDnsNameRetType) { + *arg = &val +} + +type CreateZonePayloadGetDnsNameArgType = string +type CreateZonePayloadGetDnsNameRetType = string + +/* + types and functions for expireTime +*/ + +// isInteger +type CreateZonePayloadGetExpireTimeAttributeType = *int64 +type CreateZonePayloadGetExpireTimeArgType = int64 +type CreateZonePayloadGetExpireTimeRetType = int64 + +func getCreateZonePayloadGetExpireTimeAttributeTypeOk(arg CreateZonePayloadGetExpireTimeAttributeType) (ret CreateZonePayloadGetExpireTimeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateZonePayloadGetExpireTimeAttributeType(arg *CreateZonePayloadGetExpireTimeAttributeType, val CreateZonePayloadGetExpireTimeRetType) { + *arg = &val +} + +/* + types and functions for extensions +*/ + +// isModel +type CreateZonePayloadGetExtensionsAttributeType = *CreateZonePayloadExtensions +type CreateZonePayloadGetExtensionsArgType = CreateZonePayloadExtensions +type CreateZonePayloadGetExtensionsRetType = CreateZonePayloadExtensions + +func getCreateZonePayloadGetExtensionsAttributeTypeOk(arg CreateZonePayloadGetExtensionsAttributeType) (ret CreateZonePayloadGetExtensionsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateZonePayloadGetExtensionsAttributeType(arg *CreateZonePayloadGetExtensionsAttributeType, val CreateZonePayloadGetExtensionsRetType) { + *arg = &val +} + +/* + types and functions for isReverseZone +*/ + +// isBoolean +type CreateZonePayloadgetIsReverseZoneAttributeType = *bool +type CreateZonePayloadgetIsReverseZoneArgType = bool +type CreateZonePayloadgetIsReverseZoneRetType = bool + +func getCreateZonePayloadgetIsReverseZoneAttributeTypeOk(arg CreateZonePayloadgetIsReverseZoneAttributeType) (ret CreateZonePayloadgetIsReverseZoneRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateZonePayloadgetIsReverseZoneAttributeType(arg *CreateZonePayloadgetIsReverseZoneAttributeType, val CreateZonePayloadgetIsReverseZoneRetType) { + *arg = &val +} + +/* + types and functions for name +*/ + +// isNotNullableString +type CreateZonePayloadGetNameAttributeType = *string + +func getCreateZonePayloadGetNameAttributeTypeOk(arg CreateZonePayloadGetNameAttributeType) (ret CreateZonePayloadGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateZonePayloadGetNameAttributeType(arg *CreateZonePayloadGetNameAttributeType, val CreateZonePayloadGetNameRetType) { + *arg = &val +} + +type CreateZonePayloadGetNameArgType = string +type CreateZonePayloadGetNameRetType = string + +/* + types and functions for negativeCache +*/ + +// isInteger +type CreateZonePayloadGetNegativeCacheAttributeType = *int64 +type CreateZonePayloadGetNegativeCacheArgType = int64 +type CreateZonePayloadGetNegativeCacheRetType = int64 + +func getCreateZonePayloadGetNegativeCacheAttributeTypeOk(arg CreateZonePayloadGetNegativeCacheAttributeType) (ret CreateZonePayloadGetNegativeCacheRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateZonePayloadGetNegativeCacheAttributeType(arg *CreateZonePayloadGetNegativeCacheAttributeType, val CreateZonePayloadGetNegativeCacheRetType) { + *arg = &val +} + +/* + types and functions for primaries +*/ + +// isArray +type CreateZonePayloadGetPrimariesAttributeType = *[]string +type CreateZonePayloadGetPrimariesArgType = []string +type CreateZonePayloadGetPrimariesRetType = []string + +func getCreateZonePayloadGetPrimariesAttributeTypeOk(arg CreateZonePayloadGetPrimariesAttributeType) (ret CreateZonePayloadGetPrimariesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateZonePayloadGetPrimariesAttributeType(arg *CreateZonePayloadGetPrimariesAttributeType, val CreateZonePayloadGetPrimariesRetType) { + *arg = &val +} + +/* + types and functions for refreshTime +*/ + +// isInteger +type CreateZonePayloadGetRefreshTimeAttributeType = *int64 +type CreateZonePayloadGetRefreshTimeArgType = int64 +type CreateZonePayloadGetRefreshTimeRetType = int64 + +func getCreateZonePayloadGetRefreshTimeAttributeTypeOk(arg CreateZonePayloadGetRefreshTimeAttributeType) (ret CreateZonePayloadGetRefreshTimeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateZonePayloadGetRefreshTimeAttributeType(arg *CreateZonePayloadGetRefreshTimeAttributeType, val CreateZonePayloadGetRefreshTimeRetType) { + *arg = &val +} + +/* + types and functions for retryTime +*/ + +// isInteger +type CreateZonePayloadGetRetryTimeAttributeType = *int64 +type CreateZonePayloadGetRetryTimeArgType = int64 +type CreateZonePayloadGetRetryTimeRetType = int64 + +func getCreateZonePayloadGetRetryTimeAttributeTypeOk(arg CreateZonePayloadGetRetryTimeAttributeType) (ret CreateZonePayloadGetRetryTimeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateZonePayloadGetRetryTimeAttributeType(arg *CreateZonePayloadGetRetryTimeAttributeType, val CreateZonePayloadGetRetryTimeRetType) { + *arg = &val +} + +/* + types and functions for type +*/ + +// isEnumRef +type CreateZonePayloadGetTypeAttributeType = *string +type CreateZonePayloadGetTypeArgType = string +type CreateZonePayloadGetTypeRetType = string + +func getCreateZonePayloadGetTypeAttributeTypeOk(arg CreateZonePayloadGetTypeAttributeType) (ret CreateZonePayloadGetTypeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateZonePayloadGetTypeAttributeType(arg *CreateZonePayloadGetTypeAttributeType, val CreateZonePayloadGetTypeRetType) { + *arg = &val +} + // CreateZonePayload Zone to create. type CreateZonePayload struct { // access control list - Acl *string `json:"acl,omitempty"` + Acl CreateZonePayloadGetAclAttributeType `json:"acl,omitempty"` // contact e-mail for the zone - ContactEmail *string `json:"contactEmail,omitempty"` + ContactEmail CreateZonePayloadGetContactEmailAttributeType `json:"contactEmail,omitempty"` // default time to live - DefaultTTL *int64 `json:"defaultTTL,omitempty"` + // Can be cast to int32 without loss of precision. + DefaultTTL CreateZonePayloadGetDefaultTTLAttributeType `json:"defaultTTL,omitempty"` // description of the zone - Description *string `json:"description,omitempty"` + Description CreateZonePayloadGetDescriptionAttributeType `json:"description,omitempty"` // zone name // REQUIRED - DnsName *string `json:"dnsName"` + DnsName CreateZonePayloadGetDnsNameAttributeType `json:"dnsName"` // expire time - ExpireTime *int64 `json:"expireTime,omitempty"` - Extensions *CreateZonePayloadExtensions `json:"extensions,omitempty"` + // Can be cast to int32 without loss of precision. + ExpireTime CreateZonePayloadGetExpireTimeAttributeType `json:"expireTime,omitempty"` + Extensions CreateZonePayloadGetExtensionsAttributeType `json:"extensions,omitempty"` // if the zone is a reverse zone or not - IsReverseZone *bool `json:"isReverseZone,omitempty"` + IsReverseZone CreateZonePayloadgetIsReverseZoneAttributeType `json:"isReverseZone,omitempty"` // user given name // REQUIRED - Name *string `json:"name"` + Name CreateZonePayloadGetNameAttributeType `json:"name"` // negative caching - NegativeCache *int64 `json:"negativeCache,omitempty"` + // Can be cast to int32 without loss of precision. + NegativeCache CreateZonePayloadGetNegativeCacheAttributeType `json:"negativeCache,omitempty"` // primary name server for secondary zone - Primaries *[]string `json:"primaries,omitempty"` + Primaries CreateZonePayloadGetPrimariesAttributeType `json:"primaries,omitempty"` // refresh time - RefreshTime *int64 `json:"refreshTime,omitempty"` + // Can be cast to int32 without loss of precision. + RefreshTime CreateZonePayloadGetRefreshTimeAttributeType `json:"refreshTime,omitempty"` // retry time - RetryTime *int64 `json:"retryTime,omitempty"` + // Can be cast to int32 without loss of precision. + RetryTime CreateZonePayloadGetRetryTimeAttributeType `json:"retryTime,omitempty"` // zone type - Type *string `json:"type,omitempty"` + Type CreateZonePayloadGetTypeAttributeType `json:"type,omitempty"` } type _CreateZonePayload CreateZonePayload @@ -56,18 +346,10 @@ type _CreateZonePayload CreateZonePayload // 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 NewCreateZonePayload(dnsName *string, name *string) *CreateZonePayload { +func NewCreateZonePayload(dnsName CreateZonePayloadGetDnsNameArgType, name CreateZonePayloadGetNameArgType) *CreateZonePayload { this := CreateZonePayload{} - var acl string = "0.0.0.0/0,::/0" - this.Acl = &acl - var contactEmail string = "hostmaster@stackit.cloud" - this.ContactEmail = &contactEmail - this.DnsName = dnsName - var isReverseZone bool = false - this.IsReverseZone = &isReverseZone - this.Name = name - var type_ string = "primary" - this.Type = &type_ + setCreateZonePayloadGetDnsNameAttributeType(&this.DnsName, dnsName) + setCreateZonePayloadGetNameAttributeType(&this.Name, name) return &this } @@ -80,484 +362,374 @@ func NewCreateZonePayloadWithDefaults() *CreateZonePayload { this.Acl = &acl var contactEmail string = "hostmaster@stackit.cloud" this.ContactEmail = &contactEmail + var defaultTTL int64 = 3600 + this.DefaultTTL = &defaultTTL + var expireTime int64 = 1209600 + this.ExpireTime = &expireTime var isReverseZone bool = false this.IsReverseZone = &isReverseZone + var refreshTime int64 = 3600 + this.RefreshTime = &refreshTime + var retryTime int64 = 600 + this.RetryTime = &retryTime var type_ string = "primary" this.Type = &type_ return &this } // GetAcl returns the Acl field value if set, zero value otherwise. -func (o *CreateZonePayload) GetAcl() *string { - if o == nil || IsNil(o.Acl) { - var ret *string - return ret - } - return o.Acl +func (o *CreateZonePayload) GetAcl() (res CreateZonePayloadGetAclRetType) { + res, _ = o.GetAclOk() + return } // GetAclOk returns a tuple with the Acl field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateZonePayload) GetAclOk() (*string, bool) { - if o == nil || IsNil(o.Acl) { - return nil, false - } - return o.Acl, true +func (o *CreateZonePayload) GetAclOk() (ret CreateZonePayloadGetAclRetType, ok bool) { + return getCreateZonePayloadGetAclAttributeTypeOk(o.Acl) } // HasAcl returns a boolean if a field has been set. func (o *CreateZonePayload) HasAcl() bool { - if o != nil && !IsNil(o.Acl) { - return true - } - - return false + _, ok := o.GetAclOk() + return ok } // SetAcl gets a reference to the given string and assigns it to the Acl field. -func (o *CreateZonePayload) SetAcl(v *string) { - o.Acl = v +func (o *CreateZonePayload) SetAcl(v CreateZonePayloadGetAclRetType) { + setCreateZonePayloadGetAclAttributeType(&o.Acl, v) } // GetContactEmail returns the ContactEmail field value if set, zero value otherwise. -func (o *CreateZonePayload) GetContactEmail() *string { - if o == nil || IsNil(o.ContactEmail) { - var ret *string - return ret - } - return o.ContactEmail +func (o *CreateZonePayload) GetContactEmail() (res CreateZonePayloadGetContactEmailRetType) { + res, _ = o.GetContactEmailOk() + return } // GetContactEmailOk returns a tuple with the ContactEmail field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateZonePayload) GetContactEmailOk() (*string, bool) { - if o == nil || IsNil(o.ContactEmail) { - return nil, false - } - return o.ContactEmail, true +func (o *CreateZonePayload) GetContactEmailOk() (ret CreateZonePayloadGetContactEmailRetType, ok bool) { + return getCreateZonePayloadGetContactEmailAttributeTypeOk(o.ContactEmail) } // HasContactEmail returns a boolean if a field has been set. func (o *CreateZonePayload) HasContactEmail() bool { - if o != nil && !IsNil(o.ContactEmail) { - return true - } - - return false + _, ok := o.GetContactEmailOk() + return ok } // SetContactEmail gets a reference to the given string and assigns it to the ContactEmail field. -func (o *CreateZonePayload) SetContactEmail(v *string) { - o.ContactEmail = v +func (o *CreateZonePayload) SetContactEmail(v CreateZonePayloadGetContactEmailRetType) { + setCreateZonePayloadGetContactEmailAttributeType(&o.ContactEmail, v) } // GetDefaultTTL returns the DefaultTTL field value if set, zero value otherwise. -func (o *CreateZonePayload) GetDefaultTTL() *int64 { - if o == nil || IsNil(o.DefaultTTL) { - var ret *int64 - return ret - } - return o.DefaultTTL +func (o *CreateZonePayload) GetDefaultTTL() (res CreateZonePayloadGetDefaultTTLRetType) { + res, _ = o.GetDefaultTTLOk() + return } // GetDefaultTTLOk returns a tuple with the DefaultTTL field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateZonePayload) GetDefaultTTLOk() (*int64, bool) { - if o == nil || IsNil(o.DefaultTTL) { - return nil, false - } - return o.DefaultTTL, true +func (o *CreateZonePayload) GetDefaultTTLOk() (ret CreateZonePayloadGetDefaultTTLRetType, ok bool) { + return getCreateZonePayloadGetDefaultTTLAttributeTypeOk(o.DefaultTTL) } // HasDefaultTTL returns a boolean if a field has been set. func (o *CreateZonePayload) HasDefaultTTL() bool { - if o != nil && !IsNil(o.DefaultTTL) { - return true - } - - return false + _, ok := o.GetDefaultTTLOk() + return ok } // SetDefaultTTL gets a reference to the given int64 and assigns it to the DefaultTTL field. -func (o *CreateZonePayload) SetDefaultTTL(v *int64) { - o.DefaultTTL = v +func (o *CreateZonePayload) SetDefaultTTL(v CreateZonePayloadGetDefaultTTLRetType) { + setCreateZonePayloadGetDefaultTTLAttributeType(&o.DefaultTTL, v) } // GetDescription returns the Description field value if set, zero value otherwise. -func (o *CreateZonePayload) GetDescription() *string { - if o == nil || IsNil(o.Description) { - var ret *string - return ret - } - return o.Description +func (o *CreateZonePayload) GetDescription() (res CreateZonePayloadGetDescriptionRetType) { + res, _ = o.GetDescriptionOk() + return } // 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 *CreateZonePayload) GetDescriptionOk() (*string, bool) { - if o == nil || IsNil(o.Description) { - return nil, false - } - return o.Description, true +func (o *CreateZonePayload) GetDescriptionOk() (ret CreateZonePayloadGetDescriptionRetType, ok bool) { + return getCreateZonePayloadGetDescriptionAttributeTypeOk(o.Description) } // HasDescription returns a boolean if a field has been set. func (o *CreateZonePayload) HasDescription() bool { - if o != nil && !IsNil(o.Description) { - return true - } - - return false + _, ok := o.GetDescriptionOk() + return ok } // SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *CreateZonePayload) SetDescription(v *string) { - o.Description = v +func (o *CreateZonePayload) SetDescription(v CreateZonePayloadGetDescriptionRetType) { + setCreateZonePayloadGetDescriptionAttributeType(&o.Description, v) } // GetDnsName returns the DnsName field value -func (o *CreateZonePayload) GetDnsName() *string { - if o == nil || IsNil(o.DnsName) { - var ret *string - return ret - } - - return o.DnsName +func (o *CreateZonePayload) GetDnsName() (ret CreateZonePayloadGetDnsNameRetType) { + ret, _ = o.GetDnsNameOk() + return ret } // GetDnsNameOk returns a tuple with the DnsName field value // and a boolean to check if the value has been set. -func (o *CreateZonePayload) GetDnsNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.DnsName, true +func (o *CreateZonePayload) GetDnsNameOk() (ret CreateZonePayloadGetDnsNameRetType, ok bool) { + return getCreateZonePayloadGetDnsNameAttributeTypeOk(o.DnsName) } // SetDnsName sets field value -func (o *CreateZonePayload) SetDnsName(v *string) { - o.DnsName = v +func (o *CreateZonePayload) SetDnsName(v CreateZonePayloadGetDnsNameRetType) { + setCreateZonePayloadGetDnsNameAttributeType(&o.DnsName, v) } // GetExpireTime returns the ExpireTime field value if set, zero value otherwise. -func (o *CreateZonePayload) GetExpireTime() *int64 { - if o == nil || IsNil(o.ExpireTime) { - var ret *int64 - return ret - } - return o.ExpireTime +func (o *CreateZonePayload) GetExpireTime() (res CreateZonePayloadGetExpireTimeRetType) { + res, _ = o.GetExpireTimeOk() + return } // GetExpireTimeOk returns a tuple with the ExpireTime field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateZonePayload) GetExpireTimeOk() (*int64, bool) { - if o == nil || IsNil(o.ExpireTime) { - return nil, false - } - return o.ExpireTime, true +func (o *CreateZonePayload) GetExpireTimeOk() (ret CreateZonePayloadGetExpireTimeRetType, ok bool) { + return getCreateZonePayloadGetExpireTimeAttributeTypeOk(o.ExpireTime) } // HasExpireTime returns a boolean if a field has been set. func (o *CreateZonePayload) HasExpireTime() bool { - if o != nil && !IsNil(o.ExpireTime) { - return true - } - - return false + _, ok := o.GetExpireTimeOk() + return ok } // SetExpireTime gets a reference to the given int64 and assigns it to the ExpireTime field. -func (o *CreateZonePayload) SetExpireTime(v *int64) { - o.ExpireTime = v +func (o *CreateZonePayload) SetExpireTime(v CreateZonePayloadGetExpireTimeRetType) { + setCreateZonePayloadGetExpireTimeAttributeType(&o.ExpireTime, v) } // GetExtensions returns the Extensions field value if set, zero value otherwise. -func (o *CreateZonePayload) GetExtensions() *CreateZonePayloadExtensions { - if o == nil || IsNil(o.Extensions) { - var ret *CreateZonePayloadExtensions - return ret - } - return o.Extensions +func (o *CreateZonePayload) GetExtensions() (res CreateZonePayloadGetExtensionsRetType) { + res, _ = o.GetExtensionsOk() + return } // GetExtensionsOk returns a tuple with the Extensions field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateZonePayload) GetExtensionsOk() (*CreateZonePayloadExtensions, bool) { - if o == nil || IsNil(o.Extensions) { - return nil, false - } - return o.Extensions, true +func (o *CreateZonePayload) GetExtensionsOk() (ret CreateZonePayloadGetExtensionsRetType, ok bool) { + return getCreateZonePayloadGetExtensionsAttributeTypeOk(o.Extensions) } // HasExtensions returns a boolean if a field has been set. func (o *CreateZonePayload) HasExtensions() bool { - if o != nil && !IsNil(o.Extensions) { - return true - } - - return false + _, ok := o.GetExtensionsOk() + return ok } // SetExtensions gets a reference to the given CreateZonePayloadExtensions and assigns it to the Extensions field. -func (o *CreateZonePayload) SetExtensions(v *CreateZonePayloadExtensions) { - o.Extensions = v +func (o *CreateZonePayload) SetExtensions(v CreateZonePayloadGetExtensionsRetType) { + setCreateZonePayloadGetExtensionsAttributeType(&o.Extensions, v) } // GetIsReverseZone returns the IsReverseZone field value if set, zero value otherwise. -func (o *CreateZonePayload) GetIsReverseZone() *bool { - if o == nil || IsNil(o.IsReverseZone) { - var ret *bool - return ret - } - return o.IsReverseZone +func (o *CreateZonePayload) GetIsReverseZone() (res CreateZonePayloadgetIsReverseZoneRetType) { + res, _ = o.GetIsReverseZoneOk() + return } // GetIsReverseZoneOk returns a tuple with the IsReverseZone field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateZonePayload) GetIsReverseZoneOk() (*bool, bool) { - if o == nil || IsNil(o.IsReverseZone) { - return nil, false - } - return o.IsReverseZone, true +func (o *CreateZonePayload) GetIsReverseZoneOk() (ret CreateZonePayloadgetIsReverseZoneRetType, ok bool) { + return getCreateZonePayloadgetIsReverseZoneAttributeTypeOk(o.IsReverseZone) } // HasIsReverseZone returns a boolean if a field has been set. func (o *CreateZonePayload) HasIsReverseZone() bool { - if o != nil && !IsNil(o.IsReverseZone) { - return true - } - - return false + _, ok := o.GetIsReverseZoneOk() + return ok } // SetIsReverseZone gets a reference to the given bool and assigns it to the IsReverseZone field. -func (o *CreateZonePayload) SetIsReverseZone(v *bool) { - o.IsReverseZone = v +func (o *CreateZonePayload) SetIsReverseZone(v CreateZonePayloadgetIsReverseZoneRetType) { + setCreateZonePayloadgetIsReverseZoneAttributeType(&o.IsReverseZone, v) } // GetName returns the Name field value -func (o *CreateZonePayload) GetName() *string { - if o == nil || IsNil(o.Name) { - var ret *string - return ret - } - - return o.Name +func (o *CreateZonePayload) GetName() (ret CreateZonePayloadGetNameRetType) { + ret, _ = o.GetNameOk() + return ret } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. -func (o *CreateZonePayload) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Name, true +func (o *CreateZonePayload) GetNameOk() (ret CreateZonePayloadGetNameRetType, ok bool) { + return getCreateZonePayloadGetNameAttributeTypeOk(o.Name) } // SetName sets field value -func (o *CreateZonePayload) SetName(v *string) { - o.Name = v +func (o *CreateZonePayload) SetName(v CreateZonePayloadGetNameRetType) { + setCreateZonePayloadGetNameAttributeType(&o.Name, v) } // GetNegativeCache returns the NegativeCache field value if set, zero value otherwise. -func (o *CreateZonePayload) GetNegativeCache() *int64 { - if o == nil || IsNil(o.NegativeCache) { - var ret *int64 - return ret - } - return o.NegativeCache +func (o *CreateZonePayload) GetNegativeCache() (res CreateZonePayloadGetNegativeCacheRetType) { + res, _ = o.GetNegativeCacheOk() + return } // GetNegativeCacheOk returns a tuple with the NegativeCache field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateZonePayload) GetNegativeCacheOk() (*int64, bool) { - if o == nil || IsNil(o.NegativeCache) { - return nil, false - } - return o.NegativeCache, true +func (o *CreateZonePayload) GetNegativeCacheOk() (ret CreateZonePayloadGetNegativeCacheRetType, ok bool) { + return getCreateZonePayloadGetNegativeCacheAttributeTypeOk(o.NegativeCache) } // HasNegativeCache returns a boolean if a field has been set. func (o *CreateZonePayload) HasNegativeCache() bool { - if o != nil && !IsNil(o.NegativeCache) { - return true - } - - return false + _, ok := o.GetNegativeCacheOk() + return ok } // SetNegativeCache gets a reference to the given int64 and assigns it to the NegativeCache field. -func (o *CreateZonePayload) SetNegativeCache(v *int64) { - o.NegativeCache = v +func (o *CreateZonePayload) SetNegativeCache(v CreateZonePayloadGetNegativeCacheRetType) { + setCreateZonePayloadGetNegativeCacheAttributeType(&o.NegativeCache, v) } // GetPrimaries returns the Primaries field value if set, zero value otherwise. -func (o *CreateZonePayload) GetPrimaries() *[]string { - if o == nil || IsNil(o.Primaries) { - var ret *[]string - return ret - } - return o.Primaries +func (o *CreateZonePayload) GetPrimaries() (res CreateZonePayloadGetPrimariesRetType) { + res, _ = o.GetPrimariesOk() + return } // GetPrimariesOk returns a tuple with the Primaries field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateZonePayload) GetPrimariesOk() (*[]string, bool) { - if o == nil || IsNil(o.Primaries) { - return nil, false - } - return o.Primaries, true +func (o *CreateZonePayload) GetPrimariesOk() (ret CreateZonePayloadGetPrimariesRetType, ok bool) { + return getCreateZonePayloadGetPrimariesAttributeTypeOk(o.Primaries) } // HasPrimaries returns a boolean if a field has been set. func (o *CreateZonePayload) HasPrimaries() bool { - if o != nil && !IsNil(o.Primaries) { - return true - } - - return false + _, ok := o.GetPrimariesOk() + return ok } // SetPrimaries gets a reference to the given []string and assigns it to the Primaries field. -func (o *CreateZonePayload) SetPrimaries(v *[]string) { - o.Primaries = v +func (o *CreateZonePayload) SetPrimaries(v CreateZonePayloadGetPrimariesRetType) { + setCreateZonePayloadGetPrimariesAttributeType(&o.Primaries, v) } // GetRefreshTime returns the RefreshTime field value if set, zero value otherwise. -func (o *CreateZonePayload) GetRefreshTime() *int64 { - if o == nil || IsNil(o.RefreshTime) { - var ret *int64 - return ret - } - return o.RefreshTime +func (o *CreateZonePayload) GetRefreshTime() (res CreateZonePayloadGetRefreshTimeRetType) { + res, _ = o.GetRefreshTimeOk() + return } // GetRefreshTimeOk returns a tuple with the RefreshTime field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateZonePayload) GetRefreshTimeOk() (*int64, bool) { - if o == nil || IsNil(o.RefreshTime) { - return nil, false - } - return o.RefreshTime, true +func (o *CreateZonePayload) GetRefreshTimeOk() (ret CreateZonePayloadGetRefreshTimeRetType, ok bool) { + return getCreateZonePayloadGetRefreshTimeAttributeTypeOk(o.RefreshTime) } // HasRefreshTime returns a boolean if a field has been set. func (o *CreateZonePayload) HasRefreshTime() bool { - if o != nil && !IsNil(o.RefreshTime) { - return true - } - - return false + _, ok := o.GetRefreshTimeOk() + return ok } // SetRefreshTime gets a reference to the given int64 and assigns it to the RefreshTime field. -func (o *CreateZonePayload) SetRefreshTime(v *int64) { - o.RefreshTime = v +func (o *CreateZonePayload) SetRefreshTime(v CreateZonePayloadGetRefreshTimeRetType) { + setCreateZonePayloadGetRefreshTimeAttributeType(&o.RefreshTime, v) } // GetRetryTime returns the RetryTime field value if set, zero value otherwise. -func (o *CreateZonePayload) GetRetryTime() *int64 { - if o == nil || IsNil(o.RetryTime) { - var ret *int64 - return ret - } - return o.RetryTime +func (o *CreateZonePayload) GetRetryTime() (res CreateZonePayloadGetRetryTimeRetType) { + res, _ = o.GetRetryTimeOk() + return } // GetRetryTimeOk returns a tuple with the RetryTime field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateZonePayload) GetRetryTimeOk() (*int64, bool) { - if o == nil || IsNil(o.RetryTime) { - return nil, false - } - return o.RetryTime, true +func (o *CreateZonePayload) GetRetryTimeOk() (ret CreateZonePayloadGetRetryTimeRetType, ok bool) { + return getCreateZonePayloadGetRetryTimeAttributeTypeOk(o.RetryTime) } // HasRetryTime returns a boolean if a field has been set. func (o *CreateZonePayload) HasRetryTime() bool { - if o != nil && !IsNil(o.RetryTime) { - return true - } - - return false + _, ok := o.GetRetryTimeOk() + return ok } // SetRetryTime gets a reference to the given int64 and assigns it to the RetryTime field. -func (o *CreateZonePayload) SetRetryTime(v *int64) { - o.RetryTime = v +func (o *CreateZonePayload) SetRetryTime(v CreateZonePayloadGetRetryTimeRetType) { + setCreateZonePayloadGetRetryTimeAttributeType(&o.RetryTime, v) } // GetType returns the Type field value if set, zero value otherwise. -func (o *CreateZonePayload) GetType() *string { - if o == nil || IsNil(o.Type) { - var ret *string - return ret - } - return o.Type +func (o *CreateZonePayload) GetType() (res CreateZonePayloadGetTypeRetType) { + res, _ = o.GetTypeOk() + return } // GetTypeOk returns a tuple with the Type field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateZonePayload) GetTypeOk() (*string, bool) { - if o == nil || IsNil(o.Type) { - return nil, false - } - return o.Type, true +func (o *CreateZonePayload) GetTypeOk() (ret CreateZonePayloadGetTypeRetType, ok bool) { + return getCreateZonePayloadGetTypeAttributeTypeOk(o.Type) } // HasType returns a boolean if a field has been set. func (o *CreateZonePayload) HasType() bool { - if o != nil && !IsNil(o.Type) { - return true - } - - return false + _, ok := o.GetTypeOk() + return ok } // SetType gets a reference to the given string and assigns it to the Type field. -func (o *CreateZonePayload) SetType(v *string) { - o.Type = v +func (o *CreateZonePayload) SetType(v CreateZonePayloadGetTypeRetType) { + setCreateZonePayloadGetTypeAttributeType(&o.Type, v) } func (o CreateZonePayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Acl) { - toSerialize["acl"] = o.Acl + if val, ok := getCreateZonePayloadGetAclAttributeTypeOk(o.Acl); ok { + toSerialize["Acl"] = val + } + if val, ok := getCreateZonePayloadGetContactEmailAttributeTypeOk(o.ContactEmail); ok { + toSerialize["ContactEmail"] = val + } + if val, ok := getCreateZonePayloadGetDefaultTTLAttributeTypeOk(o.DefaultTTL); ok { + toSerialize["DefaultTTL"] = val } - if !IsNil(o.ContactEmail) { - toSerialize["contactEmail"] = o.ContactEmail + if val, ok := getCreateZonePayloadGetDescriptionAttributeTypeOk(o.Description); ok { + toSerialize["Description"] = val } - if !IsNil(o.DefaultTTL) { - toSerialize["defaultTTL"] = o.DefaultTTL + if val, ok := getCreateZonePayloadGetDnsNameAttributeTypeOk(o.DnsName); ok { + toSerialize["DnsName"] = val } - if !IsNil(o.Description) { - toSerialize["description"] = o.Description + if val, ok := getCreateZonePayloadGetExpireTimeAttributeTypeOk(o.ExpireTime); ok { + toSerialize["ExpireTime"] = val } - toSerialize["dnsName"] = o.DnsName - if !IsNil(o.ExpireTime) { - toSerialize["expireTime"] = o.ExpireTime + if val, ok := getCreateZonePayloadGetExtensionsAttributeTypeOk(o.Extensions); ok { + toSerialize["Extensions"] = val } - if !IsNil(o.Extensions) { - toSerialize["extensions"] = o.Extensions + if val, ok := getCreateZonePayloadgetIsReverseZoneAttributeTypeOk(o.IsReverseZone); ok { + toSerialize["IsReverseZone"] = val } - if !IsNil(o.IsReverseZone) { - toSerialize["isReverseZone"] = o.IsReverseZone + if val, ok := getCreateZonePayloadGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val } - toSerialize["name"] = o.Name - if !IsNil(o.NegativeCache) { - toSerialize["negativeCache"] = o.NegativeCache + if val, ok := getCreateZonePayloadGetNegativeCacheAttributeTypeOk(o.NegativeCache); ok { + toSerialize["NegativeCache"] = val } - if !IsNil(o.Primaries) { - toSerialize["primaries"] = o.Primaries + if val, ok := getCreateZonePayloadGetPrimariesAttributeTypeOk(o.Primaries); ok { + toSerialize["Primaries"] = val } - if !IsNil(o.RefreshTime) { - toSerialize["refreshTime"] = o.RefreshTime + if val, ok := getCreateZonePayloadGetRefreshTimeAttributeTypeOk(o.RefreshTime); ok { + toSerialize["RefreshTime"] = val } - if !IsNil(o.RetryTime) { - toSerialize["retryTime"] = o.RetryTime + if val, ok := getCreateZonePayloadGetRetryTimeAttributeTypeOk(o.RetryTime); ok { + toSerialize["RetryTime"] = val } - if !IsNil(o.Type) { - toSerialize["type"] = o.Type + if val, ok := getCreateZonePayloadGetTypeAttributeTypeOk(o.Type); ok { + toSerialize["Type"] = val } return toSerialize, nil } diff --git a/services/dns/model_create_zone_payload_extensions.go b/services/dns/model_create_zone_payload_extensions.go index 683934cef..7d09c75ef 100644 --- a/services/dns/model_create_zone_payload_extensions.go +++ b/services/dns/model_create_zone_payload_extensions.go @@ -17,9 +17,29 @@ import ( // checks if the CreateZonePayloadExtensions type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CreateZonePayloadExtensions{} +/* + types and functions for observabilityExtension +*/ + +// isModel +type CreateZonePayloadExtensionsGetObservabilityExtensionAttributeType = *ZoneObservabilityExtension +type CreateZonePayloadExtensionsGetObservabilityExtensionArgType = ZoneObservabilityExtension +type CreateZonePayloadExtensionsGetObservabilityExtensionRetType = ZoneObservabilityExtension + +func getCreateZonePayloadExtensionsGetObservabilityExtensionAttributeTypeOk(arg CreateZonePayloadExtensionsGetObservabilityExtensionAttributeType) (ret CreateZonePayloadExtensionsGetObservabilityExtensionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateZonePayloadExtensionsGetObservabilityExtensionAttributeType(arg *CreateZonePayloadExtensionsGetObservabilityExtensionAttributeType, val CreateZonePayloadExtensionsGetObservabilityExtensionRetType) { + *arg = &val +} + // CreateZonePayloadExtensions optional extensions type CreateZonePayloadExtensions struct { - ObservabilityExtension *ZoneObservabilityExtension `json:"observabilityExtension,omitempty"` + ObservabilityExtension CreateZonePayloadExtensionsGetObservabilityExtensionAttributeType `json:"observabilityExtension,omitempty"` } // NewCreateZonePayloadExtensions instantiates a new CreateZonePayloadExtensions object @@ -40,41 +60,32 @@ func NewCreateZonePayloadExtensionsWithDefaults() *CreateZonePayloadExtensions { } // GetObservabilityExtension returns the ObservabilityExtension field value if set, zero value otherwise. -func (o *CreateZonePayloadExtensions) GetObservabilityExtension() *ZoneObservabilityExtension { - if o == nil || IsNil(o.ObservabilityExtension) { - var ret *ZoneObservabilityExtension - return ret - } - return o.ObservabilityExtension +func (o *CreateZonePayloadExtensions) GetObservabilityExtension() (res CreateZonePayloadExtensionsGetObservabilityExtensionRetType) { + res, _ = o.GetObservabilityExtensionOk() + return } // GetObservabilityExtensionOk returns a tuple with the ObservabilityExtension field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateZonePayloadExtensions) GetObservabilityExtensionOk() (*ZoneObservabilityExtension, bool) { - if o == nil || IsNil(o.ObservabilityExtension) { - return nil, false - } - return o.ObservabilityExtension, true +func (o *CreateZonePayloadExtensions) GetObservabilityExtensionOk() (ret CreateZonePayloadExtensionsGetObservabilityExtensionRetType, ok bool) { + return getCreateZonePayloadExtensionsGetObservabilityExtensionAttributeTypeOk(o.ObservabilityExtension) } // HasObservabilityExtension returns a boolean if a field has been set. func (o *CreateZonePayloadExtensions) HasObservabilityExtension() bool { - if o != nil && !IsNil(o.ObservabilityExtension) { - return true - } - - return false + _, ok := o.GetObservabilityExtensionOk() + return ok } // SetObservabilityExtension gets a reference to the given ZoneObservabilityExtension and assigns it to the ObservabilityExtension field. -func (o *CreateZonePayloadExtensions) SetObservabilityExtension(v *ZoneObservabilityExtension) { - o.ObservabilityExtension = v +func (o *CreateZonePayloadExtensions) SetObservabilityExtension(v CreateZonePayloadExtensionsGetObservabilityExtensionRetType) { + setCreateZonePayloadExtensionsGetObservabilityExtensionAttributeType(&o.ObservabilityExtension, v) } func (o CreateZonePayloadExtensions) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.ObservabilityExtension) { - toSerialize["observabilityExtension"] = o.ObservabilityExtension + if val, ok := getCreateZonePayloadExtensionsGetObservabilityExtensionAttributeTypeOk(o.ObservabilityExtension); ok { + toSerialize["ObservabilityExtension"] = val } return toSerialize, nil } diff --git a/services/dns/model_delete_label_response.go b/services/dns/model_delete_label_response.go index 3a8ee2f78..ac57785af 100644 --- a/services/dns/model_delete_label_response.go +++ b/services/dns/model_delete_label_response.go @@ -17,10 +17,51 @@ import ( // checks if the DeleteLabelResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &DeleteLabelResponse{} +/* + types and functions for label +*/ + +// isModel +type DeleteLabelResponseGetLabelAttributeType = *Label +type DeleteLabelResponseGetLabelArgType = Label +type DeleteLabelResponseGetLabelRetType = Label + +func getDeleteLabelResponseGetLabelAttributeTypeOk(arg DeleteLabelResponseGetLabelAttributeType) (ret DeleteLabelResponseGetLabelRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setDeleteLabelResponseGetLabelAttributeType(arg *DeleteLabelResponseGetLabelAttributeType, val DeleteLabelResponseGetLabelRetType) { + *arg = &val +} + +/* + types and functions for message +*/ + +// isNotNullableString +type DeleteLabelResponseGetMessageAttributeType = *string + +func getDeleteLabelResponseGetMessageAttributeTypeOk(arg DeleteLabelResponseGetMessageAttributeType) (ret DeleteLabelResponseGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setDeleteLabelResponseGetMessageAttributeType(arg *DeleteLabelResponseGetMessageAttributeType, val DeleteLabelResponseGetMessageRetType) { + *arg = &val +} + +type DeleteLabelResponseGetMessageArgType = string +type DeleteLabelResponseGetMessageRetType = string + // DeleteLabelResponse ResponseDeleteLabel. type DeleteLabelResponse struct { - Label *Label `json:"label,omitempty"` - Message *string `json:"message,omitempty"` + Label DeleteLabelResponseGetLabelAttributeType `json:"label,omitempty"` + Message DeleteLabelResponseGetMessageAttributeType `json:"message,omitempty"` } // NewDeleteLabelResponse instantiates a new DeleteLabelResponse object @@ -41,76 +82,58 @@ func NewDeleteLabelResponseWithDefaults() *DeleteLabelResponse { } // GetLabel returns the Label field value if set, zero value otherwise. -func (o *DeleteLabelResponse) GetLabel() *Label { - if o == nil || IsNil(o.Label) { - var ret *Label - return ret - } - return o.Label +func (o *DeleteLabelResponse) GetLabel() (res DeleteLabelResponseGetLabelRetType) { + res, _ = o.GetLabelOk() + return } // GetLabelOk returns a tuple with the Label field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *DeleteLabelResponse) GetLabelOk() (*Label, bool) { - if o == nil || IsNil(o.Label) { - return nil, false - } - return o.Label, true +func (o *DeleteLabelResponse) GetLabelOk() (ret DeleteLabelResponseGetLabelRetType, ok bool) { + return getDeleteLabelResponseGetLabelAttributeTypeOk(o.Label) } // HasLabel returns a boolean if a field has been set. func (o *DeleteLabelResponse) HasLabel() bool { - if o != nil && !IsNil(o.Label) { - return true - } - - return false + _, ok := o.GetLabelOk() + return ok } // SetLabel gets a reference to the given Label and assigns it to the Label field. -func (o *DeleteLabelResponse) SetLabel(v *Label) { - o.Label = v +func (o *DeleteLabelResponse) SetLabel(v DeleteLabelResponseGetLabelRetType) { + setDeleteLabelResponseGetLabelAttributeType(&o.Label, v) } // GetMessage returns the Message field value if set, zero value otherwise. -func (o *DeleteLabelResponse) GetMessage() *string { - if o == nil || IsNil(o.Message) { - var ret *string - return ret - } - return o.Message +func (o *DeleteLabelResponse) GetMessage() (res DeleteLabelResponseGetMessageRetType) { + res, _ = o.GetMessageOk() + return } // GetMessageOk returns a tuple with the Message field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *DeleteLabelResponse) GetMessageOk() (*string, bool) { - if o == nil || IsNil(o.Message) { - return nil, false - } - return o.Message, true +func (o *DeleteLabelResponse) GetMessageOk() (ret DeleteLabelResponseGetMessageRetType, ok bool) { + return getDeleteLabelResponseGetMessageAttributeTypeOk(o.Message) } // HasMessage returns a boolean if a field has been set. func (o *DeleteLabelResponse) HasMessage() bool { - if o != nil && !IsNil(o.Message) { - return true - } - - return false + _, ok := o.GetMessageOk() + return ok } // SetMessage gets a reference to the given string and assigns it to the Message field. -func (o *DeleteLabelResponse) SetMessage(v *string) { - o.Message = v +func (o *DeleteLabelResponse) SetMessage(v DeleteLabelResponseGetMessageRetType) { + setDeleteLabelResponseGetMessageAttributeType(&o.Message, v) } func (o DeleteLabelResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Label) { - toSerialize["label"] = o.Label + if val, ok := getDeleteLabelResponseGetLabelAttributeTypeOk(o.Label); ok { + toSerialize["Label"] = val } - if !IsNil(o.Message) { - toSerialize["message"] = o.Message + if val, ok := getDeleteLabelResponseGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val } return toSerialize, nil } diff --git a/services/dns/model_domain_extensions.go b/services/dns/model_domain_extensions.go index 80481c8a5..a5eec2952 100644 --- a/services/dns/model_domain_extensions.go +++ b/services/dns/model_domain_extensions.go @@ -17,9 +17,29 @@ import ( // checks if the DomainExtensions type satisfies the MappedNullable interface at compile time var _ MappedNullable = &DomainExtensions{} +/* + types and functions for observabilityExtension +*/ + +// isModel +type DomainExtensionsGetObservabilityExtensionAttributeType = *DomainObservabilityExtension +type DomainExtensionsGetObservabilityExtensionArgType = DomainObservabilityExtension +type DomainExtensionsGetObservabilityExtensionRetType = DomainObservabilityExtension + +func getDomainExtensionsGetObservabilityExtensionAttributeTypeOk(arg DomainExtensionsGetObservabilityExtensionAttributeType) (ret DomainExtensionsGetObservabilityExtensionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setDomainExtensionsGetObservabilityExtensionAttributeType(arg *DomainExtensionsGetObservabilityExtensionAttributeType, val DomainExtensionsGetObservabilityExtensionRetType) { + *arg = &val +} + // DomainExtensions struct for DomainExtensions type DomainExtensions struct { - ObservabilityExtension *DomainObservabilityExtension `json:"observabilityExtension,omitempty"` + ObservabilityExtension DomainExtensionsGetObservabilityExtensionAttributeType `json:"observabilityExtension,omitempty"` } // NewDomainExtensions instantiates a new DomainExtensions object @@ -40,41 +60,32 @@ func NewDomainExtensionsWithDefaults() *DomainExtensions { } // GetObservabilityExtension returns the ObservabilityExtension field value if set, zero value otherwise. -func (o *DomainExtensions) GetObservabilityExtension() *DomainObservabilityExtension { - if o == nil || IsNil(o.ObservabilityExtension) { - var ret *DomainObservabilityExtension - return ret - } - return o.ObservabilityExtension +func (o *DomainExtensions) GetObservabilityExtension() (res DomainExtensionsGetObservabilityExtensionRetType) { + res, _ = o.GetObservabilityExtensionOk() + return } // GetObservabilityExtensionOk returns a tuple with the ObservabilityExtension field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *DomainExtensions) GetObservabilityExtensionOk() (*DomainObservabilityExtension, bool) { - if o == nil || IsNil(o.ObservabilityExtension) { - return nil, false - } - return o.ObservabilityExtension, true +func (o *DomainExtensions) GetObservabilityExtensionOk() (ret DomainExtensionsGetObservabilityExtensionRetType, ok bool) { + return getDomainExtensionsGetObservabilityExtensionAttributeTypeOk(o.ObservabilityExtension) } // HasObservabilityExtension returns a boolean if a field has been set. func (o *DomainExtensions) HasObservabilityExtension() bool { - if o != nil && !IsNil(o.ObservabilityExtension) { - return true - } - - return false + _, ok := o.GetObservabilityExtensionOk() + return ok } // SetObservabilityExtension gets a reference to the given DomainObservabilityExtension and assigns it to the ObservabilityExtension field. -func (o *DomainExtensions) SetObservabilityExtension(v *DomainObservabilityExtension) { - o.ObservabilityExtension = v +func (o *DomainExtensions) SetObservabilityExtension(v DomainExtensionsGetObservabilityExtensionRetType) { + setDomainExtensionsGetObservabilityExtensionAttributeType(&o.ObservabilityExtension, v) } func (o DomainExtensions) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.ObservabilityExtension) { - toSerialize["observabilityExtension"] = o.ObservabilityExtension + if val, ok := getDomainExtensionsGetObservabilityExtensionAttributeTypeOk(o.ObservabilityExtension); ok { + toSerialize["ObservabilityExtension"] = val } return toSerialize, nil } diff --git a/services/dns/model_domain_observability_extension.go b/services/dns/model_domain_observability_extension.go index cf507aa02..005408d9b 100644 --- a/services/dns/model_domain_observability_extension.go +++ b/services/dns/model_domain_observability_extension.go @@ -17,11 +17,53 @@ import ( // checks if the DomainObservabilityExtension type satisfies the MappedNullable interface at compile time var _ MappedNullable = &DomainObservabilityExtension{} +/* + types and functions for observabilityInstanceId +*/ + +// isNotNullableString +type DomainObservabilityExtensionGetObservabilityInstanceIdAttributeType = *string + +func getDomainObservabilityExtensionGetObservabilityInstanceIdAttributeTypeOk(arg DomainObservabilityExtensionGetObservabilityInstanceIdAttributeType) (ret DomainObservabilityExtensionGetObservabilityInstanceIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setDomainObservabilityExtensionGetObservabilityInstanceIdAttributeType(arg *DomainObservabilityExtensionGetObservabilityInstanceIdAttributeType, val DomainObservabilityExtensionGetObservabilityInstanceIdRetType) { + *arg = &val +} + +type DomainObservabilityExtensionGetObservabilityInstanceIdArgType = string +type DomainObservabilityExtensionGetObservabilityInstanceIdRetType = string + +/* + types and functions for state +*/ + +// isNotNullableString +type DomainObservabilityExtensionGetStateAttributeType = *string + +func getDomainObservabilityExtensionGetStateAttributeTypeOk(arg DomainObservabilityExtensionGetStateAttributeType) (ret DomainObservabilityExtensionGetStateRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setDomainObservabilityExtensionGetStateAttributeType(arg *DomainObservabilityExtensionGetStateAttributeType, val DomainObservabilityExtensionGetStateRetType) { + *arg = &val +} + +type DomainObservabilityExtensionGetStateArgType = string +type DomainObservabilityExtensionGetStateRetType = string + // DomainObservabilityExtension struct for DomainObservabilityExtension type DomainObservabilityExtension struct { // REQUIRED - ObservabilityInstanceId *string `json:"observabilityInstanceId"` - State *string `json:"state,omitempty"` + ObservabilityInstanceId DomainObservabilityExtensionGetObservabilityInstanceIdAttributeType `json:"observabilityInstanceId"` + State DomainObservabilityExtensionGetStateAttributeType `json:"state,omitempty"` } type _DomainObservabilityExtension DomainObservabilityExtension @@ -30,9 +72,9 @@ type _DomainObservabilityExtension DomainObservabilityExtension // 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 NewDomainObservabilityExtension(observabilityInstanceId *string) *DomainObservabilityExtension { +func NewDomainObservabilityExtension(observabilityInstanceId DomainObservabilityExtensionGetObservabilityInstanceIdArgType) *DomainObservabilityExtension { this := DomainObservabilityExtension{} - this.ObservabilityInstanceId = observabilityInstanceId + setDomainObservabilityExtensionGetObservabilityInstanceIdAttributeType(&this.ObservabilityInstanceId, observabilityInstanceId) return &this } @@ -45,66 +87,52 @@ func NewDomainObservabilityExtensionWithDefaults() *DomainObservabilityExtension } // GetObservabilityInstanceId returns the ObservabilityInstanceId field value -func (o *DomainObservabilityExtension) GetObservabilityInstanceId() *string { - if o == nil || IsNil(o.ObservabilityInstanceId) { - var ret *string - return ret - } - - return o.ObservabilityInstanceId +func (o *DomainObservabilityExtension) GetObservabilityInstanceId() (ret DomainObservabilityExtensionGetObservabilityInstanceIdRetType) { + ret, _ = o.GetObservabilityInstanceIdOk() + return ret } // GetObservabilityInstanceIdOk returns a tuple with the ObservabilityInstanceId field value // and a boolean to check if the value has been set. -func (o *DomainObservabilityExtension) GetObservabilityInstanceIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.ObservabilityInstanceId, true +func (o *DomainObservabilityExtension) GetObservabilityInstanceIdOk() (ret DomainObservabilityExtensionGetObservabilityInstanceIdRetType, ok bool) { + return getDomainObservabilityExtensionGetObservabilityInstanceIdAttributeTypeOk(o.ObservabilityInstanceId) } // SetObservabilityInstanceId sets field value -func (o *DomainObservabilityExtension) SetObservabilityInstanceId(v *string) { - o.ObservabilityInstanceId = v +func (o *DomainObservabilityExtension) SetObservabilityInstanceId(v DomainObservabilityExtensionGetObservabilityInstanceIdRetType) { + setDomainObservabilityExtensionGetObservabilityInstanceIdAttributeType(&o.ObservabilityInstanceId, v) } // GetState returns the State field value if set, zero value otherwise. -func (o *DomainObservabilityExtension) GetState() *string { - if o == nil || IsNil(o.State) { - var ret *string - return ret - } - return o.State +func (o *DomainObservabilityExtension) GetState() (res DomainObservabilityExtensionGetStateRetType) { + res, _ = o.GetStateOk() + return } // GetStateOk returns a tuple with the State field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *DomainObservabilityExtension) GetStateOk() (*string, bool) { - if o == nil || IsNil(o.State) { - return nil, false - } - return o.State, true +func (o *DomainObservabilityExtension) GetStateOk() (ret DomainObservabilityExtensionGetStateRetType, ok bool) { + return getDomainObservabilityExtensionGetStateAttributeTypeOk(o.State) } // HasState returns a boolean if a field has been set. func (o *DomainObservabilityExtension) HasState() bool { - if o != nil && !IsNil(o.State) { - return true - } - - return false + _, ok := o.GetStateOk() + return ok } // SetState gets a reference to the given string and assigns it to the State field. -func (o *DomainObservabilityExtension) SetState(v *string) { - o.State = v +func (o *DomainObservabilityExtension) SetState(v DomainObservabilityExtensionGetStateRetType) { + setDomainObservabilityExtensionGetStateAttributeType(&o.State, v) } func (o DomainObservabilityExtension) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["observabilityInstanceId"] = o.ObservabilityInstanceId - if !IsNil(o.State) { - toSerialize["state"] = o.State + if val, ok := getDomainObservabilityExtensionGetObservabilityInstanceIdAttributeTypeOk(o.ObservabilityInstanceId); ok { + toSerialize["ObservabilityInstanceId"] = val + } + if val, ok := getDomainObservabilityExtensionGetStateAttributeTypeOk(o.State); ok { + toSerialize["State"] = val } return toSerialize, nil } diff --git a/services/dns/model_error_message.go b/services/dns/model_error_message.go index 88f8a5504..f5d78332f 100644 --- a/services/dns/model_error_message.go +++ b/services/dns/model_error_message.go @@ -17,10 +17,52 @@ import ( // checks if the ErrorMessage type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ErrorMessage{} +/* + types and functions for error +*/ + +// isNotNullableString +type ErrorMessageGetErrorAttributeType = *string + +func getErrorMessageGetErrorAttributeTypeOk(arg ErrorMessageGetErrorAttributeType) (ret ErrorMessageGetErrorRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setErrorMessageGetErrorAttributeType(arg *ErrorMessageGetErrorAttributeType, val ErrorMessageGetErrorRetType) { + *arg = &val +} + +type ErrorMessageGetErrorArgType = string +type ErrorMessageGetErrorRetType = string + +/* + types and functions for message +*/ + +// isNotNullableString +type ErrorMessageGetMessageAttributeType = *string + +func getErrorMessageGetMessageAttributeTypeOk(arg ErrorMessageGetMessageAttributeType) (ret ErrorMessageGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setErrorMessageGetMessageAttributeType(arg *ErrorMessageGetMessageAttributeType, val ErrorMessageGetMessageRetType) { + *arg = &val +} + +type ErrorMessageGetMessageArgType = string +type ErrorMessageGetMessageRetType = string + // ErrorMessage struct for ErrorMessage type ErrorMessage struct { - Error *string `json:"error,omitempty"` - Message *string `json:"message,omitempty"` + Error ErrorMessageGetErrorAttributeType `json:"error,omitempty"` + Message ErrorMessageGetMessageAttributeType `json:"message,omitempty"` } // NewErrorMessage instantiates a new ErrorMessage object @@ -41,76 +83,58 @@ func NewErrorMessageWithDefaults() *ErrorMessage { } // GetError returns the Error field value if set, zero value otherwise. -func (o *ErrorMessage) GetError() *string { - if o == nil || IsNil(o.Error) { - var ret *string - return ret - } - return o.Error +func (o *ErrorMessage) GetError() (res ErrorMessageGetErrorRetType) { + res, _ = o.GetErrorOk() + return } // GetErrorOk returns a tuple with the Error field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ErrorMessage) GetErrorOk() (*string, bool) { - if o == nil || IsNil(o.Error) { - return nil, false - } - return o.Error, true +func (o *ErrorMessage) GetErrorOk() (ret ErrorMessageGetErrorRetType, ok bool) { + return getErrorMessageGetErrorAttributeTypeOk(o.Error) } // HasError returns a boolean if a field has been set. func (o *ErrorMessage) HasError() bool { - if o != nil && !IsNil(o.Error) { - return true - } - - return false + _, ok := o.GetErrorOk() + return ok } // SetError gets a reference to the given string and assigns it to the Error field. -func (o *ErrorMessage) SetError(v *string) { - o.Error = v +func (o *ErrorMessage) SetError(v ErrorMessageGetErrorRetType) { + setErrorMessageGetErrorAttributeType(&o.Error, v) } // GetMessage returns the Message field value if set, zero value otherwise. -func (o *ErrorMessage) GetMessage() *string { - if o == nil || IsNil(o.Message) { - var ret *string - return ret - } - return o.Message +func (o *ErrorMessage) GetMessage() (res ErrorMessageGetMessageRetType) { + res, _ = o.GetMessageOk() + return } // GetMessageOk returns a tuple with the Message field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ErrorMessage) GetMessageOk() (*string, bool) { - if o == nil || IsNil(o.Message) { - return nil, false - } - return o.Message, true +func (o *ErrorMessage) GetMessageOk() (ret ErrorMessageGetMessageRetType, ok bool) { + return getErrorMessageGetMessageAttributeTypeOk(o.Message) } // HasMessage returns a boolean if a field has been set. func (o *ErrorMessage) HasMessage() bool { - if o != nil && !IsNil(o.Message) { - return true - } - - return false + _, ok := o.GetMessageOk() + return ok } // SetMessage gets a reference to the given string and assigns it to the Message field. -func (o *ErrorMessage) SetMessage(v *string) { - o.Message = v +func (o *ErrorMessage) SetMessage(v ErrorMessageGetMessageRetType) { + setErrorMessageGetMessageAttributeType(&o.Message, v) } func (o ErrorMessage) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Error) { - toSerialize["error"] = o.Error + if val, ok := getErrorMessageGetErrorAttributeTypeOk(o.Error); ok { + toSerialize["Error"] = val } - if !IsNil(o.Message) { - toSerialize["message"] = o.Message + if val, ok := getErrorMessageGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val } return toSerialize, nil } diff --git a/services/dns/model_export_record_sets_payload.go b/services/dns/model_export_record_sets_payload.go index 97e955335..730dec4ab 100644 --- a/services/dns/model_export_record_sets_payload.go +++ b/services/dns/model_export_record_sets_payload.go @@ -17,10 +17,50 @@ import ( // checks if the ExportRecordSetsPayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ExportRecordSetsPayload{} +/* + types and functions for exportAsFQDN +*/ + +// isBoolean +type ExportRecordSetsPayloadgetExportAsFQDNAttributeType = *bool +type ExportRecordSetsPayloadgetExportAsFQDNArgType = bool +type ExportRecordSetsPayloadgetExportAsFQDNRetType = bool + +func getExportRecordSetsPayloadgetExportAsFQDNAttributeTypeOk(arg ExportRecordSetsPayloadgetExportAsFQDNAttributeType) (ret ExportRecordSetsPayloadgetExportAsFQDNRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setExportRecordSetsPayloadgetExportAsFQDNAttributeType(arg *ExportRecordSetsPayloadgetExportAsFQDNAttributeType, val ExportRecordSetsPayloadgetExportAsFQDNRetType) { + *arg = &val +} + +/* + types and functions for format +*/ + +// isEnumRef +type ExportRecordSetsPayloadGetFormatAttributeType = *string +type ExportRecordSetsPayloadGetFormatArgType = string +type ExportRecordSetsPayloadGetFormatRetType = string + +func getExportRecordSetsPayloadGetFormatAttributeTypeOk(arg ExportRecordSetsPayloadGetFormatAttributeType) (ret ExportRecordSetsPayloadGetFormatRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setExportRecordSetsPayloadGetFormatAttributeType(arg *ExportRecordSetsPayloadGetFormatAttributeType, val ExportRecordSetsPayloadGetFormatRetType) { + *arg = &val +} + // ExportRecordSetsPayload struct for ExportRecordSetsPayload type ExportRecordSetsPayload struct { - ExportAsFQDN *bool `json:"exportAsFQDN,omitempty"` - Format *string `json:"format,omitempty"` + ExportAsFQDN ExportRecordSetsPayloadgetExportAsFQDNAttributeType `json:"exportAsFQDN,omitempty"` + Format ExportRecordSetsPayloadGetFormatAttributeType `json:"format,omitempty"` } // NewExportRecordSetsPayload instantiates a new ExportRecordSetsPayload object @@ -29,10 +69,6 @@ type ExportRecordSetsPayload struct { // will change when the set of required properties is changed func NewExportRecordSetsPayload() *ExportRecordSetsPayload { this := ExportRecordSetsPayload{} - var exportAsFQDN bool = true - this.ExportAsFQDN = &exportAsFQDN - var format string = "csv" - this.Format = &format return &this } @@ -49,76 +85,58 @@ func NewExportRecordSetsPayloadWithDefaults() *ExportRecordSetsPayload { } // GetExportAsFQDN returns the ExportAsFQDN field value if set, zero value otherwise. -func (o *ExportRecordSetsPayload) GetExportAsFQDN() *bool { - if o == nil || IsNil(o.ExportAsFQDN) { - var ret *bool - return ret - } - return o.ExportAsFQDN +func (o *ExportRecordSetsPayload) GetExportAsFQDN() (res ExportRecordSetsPayloadgetExportAsFQDNRetType) { + res, _ = o.GetExportAsFQDNOk() + return } // GetExportAsFQDNOk returns a tuple with the ExportAsFQDN field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ExportRecordSetsPayload) GetExportAsFQDNOk() (*bool, bool) { - if o == nil || IsNil(o.ExportAsFQDN) { - return nil, false - } - return o.ExportAsFQDN, true +func (o *ExportRecordSetsPayload) GetExportAsFQDNOk() (ret ExportRecordSetsPayloadgetExportAsFQDNRetType, ok bool) { + return getExportRecordSetsPayloadgetExportAsFQDNAttributeTypeOk(o.ExportAsFQDN) } // HasExportAsFQDN returns a boolean if a field has been set. func (o *ExportRecordSetsPayload) HasExportAsFQDN() bool { - if o != nil && !IsNil(o.ExportAsFQDN) { - return true - } - - return false + _, ok := o.GetExportAsFQDNOk() + return ok } // SetExportAsFQDN gets a reference to the given bool and assigns it to the ExportAsFQDN field. -func (o *ExportRecordSetsPayload) SetExportAsFQDN(v *bool) { - o.ExportAsFQDN = v +func (o *ExportRecordSetsPayload) SetExportAsFQDN(v ExportRecordSetsPayloadgetExportAsFQDNRetType) { + setExportRecordSetsPayloadgetExportAsFQDNAttributeType(&o.ExportAsFQDN, v) } // GetFormat returns the Format field value if set, zero value otherwise. -func (o *ExportRecordSetsPayload) GetFormat() *string { - if o == nil || IsNil(o.Format) { - var ret *string - return ret - } - return o.Format +func (o *ExportRecordSetsPayload) GetFormat() (res ExportRecordSetsPayloadGetFormatRetType) { + res, _ = o.GetFormatOk() + return } // GetFormatOk returns a tuple with the Format field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ExportRecordSetsPayload) GetFormatOk() (*string, bool) { - if o == nil || IsNil(o.Format) { - return nil, false - } - return o.Format, true +func (o *ExportRecordSetsPayload) GetFormatOk() (ret ExportRecordSetsPayloadGetFormatRetType, ok bool) { + return getExportRecordSetsPayloadGetFormatAttributeTypeOk(o.Format) } // HasFormat returns a boolean if a field has been set. func (o *ExportRecordSetsPayload) HasFormat() bool { - if o != nil && !IsNil(o.Format) { - return true - } - - return false + _, ok := o.GetFormatOk() + return ok } // SetFormat gets a reference to the given string and assigns it to the Format field. -func (o *ExportRecordSetsPayload) SetFormat(v *string) { - o.Format = v +func (o *ExportRecordSetsPayload) SetFormat(v ExportRecordSetsPayloadGetFormatRetType) { + setExportRecordSetsPayloadGetFormatAttributeType(&o.Format, v) } func (o ExportRecordSetsPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.ExportAsFQDN) { - toSerialize["exportAsFQDN"] = o.ExportAsFQDN + if val, ok := getExportRecordSetsPayloadgetExportAsFQDNAttributeTypeOk(o.ExportAsFQDN); ok { + toSerialize["ExportAsFQDN"] = val } - if !IsNil(o.Format) { - toSerialize["format"] = o.Format + if val, ok := getExportRecordSetsPayloadGetFormatAttributeTypeOk(o.Format); ok { + toSerialize["Format"] = val } return toSerialize, nil } diff --git a/services/dns/model_import_record_sets_payload.go b/services/dns/model_import_record_sets_payload.go index 8b7fc0375..e47e7570d 100644 --- a/services/dns/model_import_record_sets_payload.go +++ b/services/dns/model_import_record_sets_payload.go @@ -17,9 +17,29 @@ import ( // checks if the ImportRecordSetsPayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ImportRecordSetsPayload{} +/* + types and functions for rrSets +*/ + +// isArray +type ImportRecordSetsPayloadGetRrSetsAttributeType = *[]ZoneModelsImportRecordModel +type ImportRecordSetsPayloadGetRrSetsArgType = []ZoneModelsImportRecordModel +type ImportRecordSetsPayloadGetRrSetsRetType = []ZoneModelsImportRecordModel + +func getImportRecordSetsPayloadGetRrSetsAttributeTypeOk(arg ImportRecordSetsPayloadGetRrSetsAttributeType) (ret ImportRecordSetsPayloadGetRrSetsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setImportRecordSetsPayloadGetRrSetsAttributeType(arg *ImportRecordSetsPayloadGetRrSetsAttributeType, val ImportRecordSetsPayloadGetRrSetsRetType) { + *arg = &val +} + // ImportRecordSetsPayload struct for ImportRecordSetsPayload type ImportRecordSetsPayload struct { - RrSets *[]ZoneModelsImportRecordModel `json:"rrSets,omitempty"` + RrSets ImportRecordSetsPayloadGetRrSetsAttributeType `json:"rrSets,omitempty"` } // NewImportRecordSetsPayload instantiates a new ImportRecordSetsPayload object @@ -40,41 +60,32 @@ func NewImportRecordSetsPayloadWithDefaults() *ImportRecordSetsPayload { } // GetRrSets returns the RrSets field value if set, zero value otherwise. -func (o *ImportRecordSetsPayload) GetRrSets() *[]ZoneModelsImportRecordModel { - if o == nil || IsNil(o.RrSets) { - var ret *[]ZoneModelsImportRecordModel - return ret - } - return o.RrSets +func (o *ImportRecordSetsPayload) GetRrSets() (res ImportRecordSetsPayloadGetRrSetsRetType) { + res, _ = o.GetRrSetsOk() + return } // GetRrSetsOk returns a tuple with the RrSets field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ImportRecordSetsPayload) GetRrSetsOk() (*[]ZoneModelsImportRecordModel, bool) { - if o == nil || IsNil(o.RrSets) { - return nil, false - } - return o.RrSets, true +func (o *ImportRecordSetsPayload) GetRrSetsOk() (ret ImportRecordSetsPayloadGetRrSetsRetType, ok bool) { + return getImportRecordSetsPayloadGetRrSetsAttributeTypeOk(o.RrSets) } // HasRrSets returns a boolean if a field has been set. func (o *ImportRecordSetsPayload) HasRrSets() bool { - if o != nil && !IsNil(o.RrSets) { - return true - } - - return false + _, ok := o.GetRrSetsOk() + return ok } // SetRrSets gets a reference to the given []ZoneModelsImportRecordModel and assigns it to the RrSets field. -func (o *ImportRecordSetsPayload) SetRrSets(v *[]ZoneModelsImportRecordModel) { - o.RrSets = v +func (o *ImportRecordSetsPayload) SetRrSets(v ImportRecordSetsPayloadGetRrSetsRetType) { + setImportRecordSetsPayloadGetRrSetsAttributeType(&o.RrSets, v) } func (o ImportRecordSetsPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.RrSets) { - toSerialize["rrSets"] = o.RrSets + if val, ok := getImportRecordSetsPayloadGetRrSetsAttributeTypeOk(o.RrSets); ok { + toSerialize["RrSets"] = val } return toSerialize, nil } diff --git a/services/dns/model_import_record_sets_response.go b/services/dns/model_import_record_sets_response.go index ef7ebff77..4ed1f4534 100644 --- a/services/dns/model_import_record_sets_response.go +++ b/services/dns/model_import_record_sets_response.go @@ -17,11 +17,52 @@ import ( // checks if the ImportRecordSetsResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ImportRecordSetsResponse{} +/* + types and functions for message +*/ + +// isNotNullableString +type ImportRecordSetsResponseGetMessageAttributeType = *string + +func getImportRecordSetsResponseGetMessageAttributeTypeOk(arg ImportRecordSetsResponseGetMessageAttributeType) (ret ImportRecordSetsResponseGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setImportRecordSetsResponseGetMessageAttributeType(arg *ImportRecordSetsResponseGetMessageAttributeType, val ImportRecordSetsResponseGetMessageRetType) { + *arg = &val +} + +type ImportRecordSetsResponseGetMessageArgType = string +type ImportRecordSetsResponseGetMessageRetType = string + +/* + types and functions for summary +*/ + +// isModel +type ImportRecordSetsResponseGetSummaryAttributeType = *ImportSummary +type ImportRecordSetsResponseGetSummaryArgType = ImportSummary +type ImportRecordSetsResponseGetSummaryRetType = ImportSummary + +func getImportRecordSetsResponseGetSummaryAttributeTypeOk(arg ImportRecordSetsResponseGetSummaryAttributeType) (ret ImportRecordSetsResponseGetSummaryRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setImportRecordSetsResponseGetSummaryAttributeType(arg *ImportRecordSetsResponseGetSummaryAttributeType, val ImportRecordSetsResponseGetSummaryRetType) { + *arg = &val +} + // ImportRecordSetsResponse ImportSummaryResponse is the response of the import. type ImportRecordSetsResponse struct { - Message *string `json:"message,omitempty"` + Message ImportRecordSetsResponseGetMessageAttributeType `json:"message,omitempty"` // REQUIRED - Summary *ImportSummary `json:"summary"` + Summary ImportRecordSetsResponseGetSummaryAttributeType `json:"summary"` } type _ImportRecordSetsResponse ImportRecordSetsResponse @@ -30,9 +71,9 @@ type _ImportRecordSetsResponse ImportRecordSetsResponse // 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 NewImportRecordSetsResponse(summary *ImportSummary) *ImportRecordSetsResponse { +func NewImportRecordSetsResponse(summary ImportRecordSetsResponseGetSummaryArgType) *ImportRecordSetsResponse { this := ImportRecordSetsResponse{} - this.Summary = summary + setImportRecordSetsResponseGetSummaryAttributeType(&this.Summary, summary) return &this } @@ -45,67 +86,53 @@ func NewImportRecordSetsResponseWithDefaults() *ImportRecordSetsResponse { } // GetMessage returns the Message field value if set, zero value otherwise. -func (o *ImportRecordSetsResponse) GetMessage() *string { - if o == nil || IsNil(o.Message) { - var ret *string - return ret - } - return o.Message +func (o *ImportRecordSetsResponse) GetMessage() (res ImportRecordSetsResponseGetMessageRetType) { + res, _ = o.GetMessageOk() + return } // GetMessageOk returns a tuple with the Message field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ImportRecordSetsResponse) GetMessageOk() (*string, bool) { - if o == nil || IsNil(o.Message) { - return nil, false - } - return o.Message, true +func (o *ImportRecordSetsResponse) GetMessageOk() (ret ImportRecordSetsResponseGetMessageRetType, ok bool) { + return getImportRecordSetsResponseGetMessageAttributeTypeOk(o.Message) } // HasMessage returns a boolean if a field has been set. func (o *ImportRecordSetsResponse) HasMessage() bool { - if o != nil && !IsNil(o.Message) { - return true - } - - return false + _, ok := o.GetMessageOk() + return ok } // SetMessage gets a reference to the given string and assigns it to the Message field. -func (o *ImportRecordSetsResponse) SetMessage(v *string) { - o.Message = v +func (o *ImportRecordSetsResponse) SetMessage(v ImportRecordSetsResponseGetMessageRetType) { + setImportRecordSetsResponseGetMessageAttributeType(&o.Message, v) } // GetSummary returns the Summary field value -func (o *ImportRecordSetsResponse) GetSummary() *ImportSummary { - if o == nil || IsNil(o.Summary) { - var ret *ImportSummary - return ret - } - - return o.Summary +func (o *ImportRecordSetsResponse) GetSummary() (ret ImportRecordSetsResponseGetSummaryRetType) { + ret, _ = o.GetSummaryOk() + return ret } // GetSummaryOk returns a tuple with the Summary field value // and a boolean to check if the value has been set. -func (o *ImportRecordSetsResponse) GetSummaryOk() (*ImportSummary, bool) { - if o == nil { - return nil, false - } - return o.Summary, true +func (o *ImportRecordSetsResponse) GetSummaryOk() (ret ImportRecordSetsResponseGetSummaryRetType, ok bool) { + return getImportRecordSetsResponseGetSummaryAttributeTypeOk(o.Summary) } // SetSummary sets field value -func (o *ImportRecordSetsResponse) SetSummary(v *ImportSummary) { - o.Summary = v +func (o *ImportRecordSetsResponse) SetSummary(v ImportRecordSetsResponseGetSummaryRetType) { + setImportRecordSetsResponseGetSummaryAttributeType(&o.Summary, v) } func (o ImportRecordSetsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Message) { - toSerialize["message"] = o.Message + if val, ok := getImportRecordSetsResponseGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val + } + if val, ok := getImportRecordSetsResponseGetSummaryAttributeTypeOk(o.Summary); ok { + toSerialize["Summary"] = val } - toSerialize["summary"] = o.Summary return toSerialize, nil } diff --git a/services/dns/model_import_summary.go b/services/dns/model_import_summary.go index ae15dcb01..aa243c7cf 100644 --- a/services/dns/model_import_summary.go +++ b/services/dns/model_import_summary.go @@ -17,14 +17,140 @@ import ( // checks if the ImportSummary type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ImportSummary{} +/* + types and functions for createdRRSets +*/ + +// isInteger +type ImportSummaryGetCreatedRRSetsAttributeType = *int64 +type ImportSummaryGetCreatedRRSetsArgType = int64 +type ImportSummaryGetCreatedRRSetsRetType = int64 + +func getImportSummaryGetCreatedRRSetsAttributeTypeOk(arg ImportSummaryGetCreatedRRSetsAttributeType) (ret ImportSummaryGetCreatedRRSetsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setImportSummaryGetCreatedRRSetsAttributeType(arg *ImportSummaryGetCreatedRRSetsAttributeType, val ImportSummaryGetCreatedRRSetsRetType) { + *arg = &val +} + +/* + types and functions for createdRecords +*/ + +// isInteger +type ImportSummaryGetCreatedRecordsAttributeType = *int64 +type ImportSummaryGetCreatedRecordsArgType = int64 +type ImportSummaryGetCreatedRecordsRetType = int64 + +func getImportSummaryGetCreatedRecordsAttributeTypeOk(arg ImportSummaryGetCreatedRecordsAttributeType) (ret ImportSummaryGetCreatedRecordsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setImportSummaryGetCreatedRecordsAttributeType(arg *ImportSummaryGetCreatedRecordsAttributeType, val ImportSummaryGetCreatedRecordsRetType) { + *arg = &val +} + +/* + types and functions for deletedRRSets +*/ + +// isInteger +type ImportSummaryGetDeletedRRSetsAttributeType = *int64 +type ImportSummaryGetDeletedRRSetsArgType = int64 +type ImportSummaryGetDeletedRRSetsRetType = int64 + +func getImportSummaryGetDeletedRRSetsAttributeTypeOk(arg ImportSummaryGetDeletedRRSetsAttributeType) (ret ImportSummaryGetDeletedRRSetsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setImportSummaryGetDeletedRRSetsAttributeType(arg *ImportSummaryGetDeletedRRSetsAttributeType, val ImportSummaryGetDeletedRRSetsRetType) { + *arg = &val +} + +/* + types and functions for deletedRecords +*/ + +// isInteger +type ImportSummaryGetDeletedRecordsAttributeType = *int64 +type ImportSummaryGetDeletedRecordsArgType = int64 +type ImportSummaryGetDeletedRecordsRetType = int64 + +func getImportSummaryGetDeletedRecordsAttributeTypeOk(arg ImportSummaryGetDeletedRecordsAttributeType) (ret ImportSummaryGetDeletedRecordsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setImportSummaryGetDeletedRecordsAttributeType(arg *ImportSummaryGetDeletedRecordsAttributeType, val ImportSummaryGetDeletedRecordsRetType) { + *arg = &val +} + +/* + types and functions for updatedRRSets +*/ + +// isInteger +type ImportSummaryGetUpdatedRRSetsAttributeType = *int64 +type ImportSummaryGetUpdatedRRSetsArgType = int64 +type ImportSummaryGetUpdatedRRSetsRetType = int64 + +func getImportSummaryGetUpdatedRRSetsAttributeTypeOk(arg ImportSummaryGetUpdatedRRSetsAttributeType) (ret ImportSummaryGetUpdatedRRSetsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setImportSummaryGetUpdatedRRSetsAttributeType(arg *ImportSummaryGetUpdatedRRSetsAttributeType, val ImportSummaryGetUpdatedRRSetsRetType) { + *arg = &val +} + +/* + types and functions for updatedRecords +*/ + +// isInteger +type ImportSummaryGetUpdatedRecordsAttributeType = *int64 +type ImportSummaryGetUpdatedRecordsArgType = int64 +type ImportSummaryGetUpdatedRecordsRetType = int64 + +func getImportSummaryGetUpdatedRecordsAttributeTypeOk(arg ImportSummaryGetUpdatedRecordsAttributeType) (ret ImportSummaryGetUpdatedRecordsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setImportSummaryGetUpdatedRecordsAttributeType(arg *ImportSummaryGetUpdatedRecordsAttributeType, val ImportSummaryGetUpdatedRecordsRetType) { + *arg = &val +} + // ImportSummary ImportSummary is the summary of the import. type ImportSummary struct { - CreatedRRSets *int64 `json:"createdRRSets,omitempty"` - CreatedRecords *int64 `json:"createdRecords,omitempty"` - DeletedRRSets *int64 `json:"deletedRRSets,omitempty"` - DeletedRecords *int64 `json:"deletedRecords,omitempty"` - UpdatedRRSets *int64 `json:"updatedRRSets,omitempty"` - UpdatedRecords *int64 `json:"updatedRecords,omitempty"` + // Can be cast to int32 without loss of precision. + CreatedRRSets ImportSummaryGetCreatedRRSetsAttributeType `json:"createdRRSets,omitempty"` + // Can be cast to int32 without loss of precision. + CreatedRecords ImportSummaryGetCreatedRecordsAttributeType `json:"createdRecords,omitempty"` + // Can be cast to int32 without loss of precision. + DeletedRRSets ImportSummaryGetDeletedRRSetsAttributeType `json:"deletedRRSets,omitempty"` + // Can be cast to int32 without loss of precision. + DeletedRecords ImportSummaryGetDeletedRecordsAttributeType `json:"deletedRecords,omitempty"` + // Can be cast to int32 without loss of precision. + UpdatedRRSets ImportSummaryGetUpdatedRRSetsAttributeType `json:"updatedRRSets,omitempty"` + // Can be cast to int32 without loss of precision. + UpdatedRecords ImportSummaryGetUpdatedRecordsAttributeType `json:"updatedRecords,omitempty"` } // NewImportSummary instantiates a new ImportSummary object @@ -45,216 +171,162 @@ func NewImportSummaryWithDefaults() *ImportSummary { } // GetCreatedRRSets returns the CreatedRRSets field value if set, zero value otherwise. -func (o *ImportSummary) GetCreatedRRSets() *int64 { - if o == nil || IsNil(o.CreatedRRSets) { - var ret *int64 - return ret - } - return o.CreatedRRSets +func (o *ImportSummary) GetCreatedRRSets() (res ImportSummaryGetCreatedRRSetsRetType) { + res, _ = o.GetCreatedRRSetsOk() + return } // GetCreatedRRSetsOk returns a tuple with the CreatedRRSets field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ImportSummary) GetCreatedRRSetsOk() (*int64, bool) { - if o == nil || IsNil(o.CreatedRRSets) { - return nil, false - } - return o.CreatedRRSets, true +func (o *ImportSummary) GetCreatedRRSetsOk() (ret ImportSummaryGetCreatedRRSetsRetType, ok bool) { + return getImportSummaryGetCreatedRRSetsAttributeTypeOk(o.CreatedRRSets) } // HasCreatedRRSets returns a boolean if a field has been set. func (o *ImportSummary) HasCreatedRRSets() bool { - if o != nil && !IsNil(o.CreatedRRSets) { - return true - } - - return false + _, ok := o.GetCreatedRRSetsOk() + return ok } // SetCreatedRRSets gets a reference to the given int64 and assigns it to the CreatedRRSets field. -func (o *ImportSummary) SetCreatedRRSets(v *int64) { - o.CreatedRRSets = v +func (o *ImportSummary) SetCreatedRRSets(v ImportSummaryGetCreatedRRSetsRetType) { + setImportSummaryGetCreatedRRSetsAttributeType(&o.CreatedRRSets, v) } // GetCreatedRecords returns the CreatedRecords field value if set, zero value otherwise. -func (o *ImportSummary) GetCreatedRecords() *int64 { - if o == nil || IsNil(o.CreatedRecords) { - var ret *int64 - return ret - } - return o.CreatedRecords +func (o *ImportSummary) GetCreatedRecords() (res ImportSummaryGetCreatedRecordsRetType) { + res, _ = o.GetCreatedRecordsOk() + return } // GetCreatedRecordsOk returns a tuple with the CreatedRecords field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ImportSummary) GetCreatedRecordsOk() (*int64, bool) { - if o == nil || IsNil(o.CreatedRecords) { - return nil, false - } - return o.CreatedRecords, true +func (o *ImportSummary) GetCreatedRecordsOk() (ret ImportSummaryGetCreatedRecordsRetType, ok bool) { + return getImportSummaryGetCreatedRecordsAttributeTypeOk(o.CreatedRecords) } // HasCreatedRecords returns a boolean if a field has been set. func (o *ImportSummary) HasCreatedRecords() bool { - if o != nil && !IsNil(o.CreatedRecords) { - return true - } - - return false + _, ok := o.GetCreatedRecordsOk() + return ok } // SetCreatedRecords gets a reference to the given int64 and assigns it to the CreatedRecords field. -func (o *ImportSummary) SetCreatedRecords(v *int64) { - o.CreatedRecords = v +func (o *ImportSummary) SetCreatedRecords(v ImportSummaryGetCreatedRecordsRetType) { + setImportSummaryGetCreatedRecordsAttributeType(&o.CreatedRecords, v) } // GetDeletedRRSets returns the DeletedRRSets field value if set, zero value otherwise. -func (o *ImportSummary) GetDeletedRRSets() *int64 { - if o == nil || IsNil(o.DeletedRRSets) { - var ret *int64 - return ret - } - return o.DeletedRRSets +func (o *ImportSummary) GetDeletedRRSets() (res ImportSummaryGetDeletedRRSetsRetType) { + res, _ = o.GetDeletedRRSetsOk() + return } // GetDeletedRRSetsOk returns a tuple with the DeletedRRSets field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ImportSummary) GetDeletedRRSetsOk() (*int64, bool) { - if o == nil || IsNil(o.DeletedRRSets) { - return nil, false - } - return o.DeletedRRSets, true +func (o *ImportSummary) GetDeletedRRSetsOk() (ret ImportSummaryGetDeletedRRSetsRetType, ok bool) { + return getImportSummaryGetDeletedRRSetsAttributeTypeOk(o.DeletedRRSets) } // HasDeletedRRSets returns a boolean if a field has been set. func (o *ImportSummary) HasDeletedRRSets() bool { - if o != nil && !IsNil(o.DeletedRRSets) { - return true - } - - return false + _, ok := o.GetDeletedRRSetsOk() + return ok } // SetDeletedRRSets gets a reference to the given int64 and assigns it to the DeletedRRSets field. -func (o *ImportSummary) SetDeletedRRSets(v *int64) { - o.DeletedRRSets = v +func (o *ImportSummary) SetDeletedRRSets(v ImportSummaryGetDeletedRRSetsRetType) { + setImportSummaryGetDeletedRRSetsAttributeType(&o.DeletedRRSets, v) } // GetDeletedRecords returns the DeletedRecords field value if set, zero value otherwise. -func (o *ImportSummary) GetDeletedRecords() *int64 { - if o == nil || IsNil(o.DeletedRecords) { - var ret *int64 - return ret - } - return o.DeletedRecords +func (o *ImportSummary) GetDeletedRecords() (res ImportSummaryGetDeletedRecordsRetType) { + res, _ = o.GetDeletedRecordsOk() + return } // GetDeletedRecordsOk returns a tuple with the DeletedRecords field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ImportSummary) GetDeletedRecordsOk() (*int64, bool) { - if o == nil || IsNil(o.DeletedRecords) { - return nil, false - } - return o.DeletedRecords, true +func (o *ImportSummary) GetDeletedRecordsOk() (ret ImportSummaryGetDeletedRecordsRetType, ok bool) { + return getImportSummaryGetDeletedRecordsAttributeTypeOk(o.DeletedRecords) } // HasDeletedRecords returns a boolean if a field has been set. func (o *ImportSummary) HasDeletedRecords() bool { - if o != nil && !IsNil(o.DeletedRecords) { - return true - } - - return false + _, ok := o.GetDeletedRecordsOk() + return ok } // SetDeletedRecords gets a reference to the given int64 and assigns it to the DeletedRecords field. -func (o *ImportSummary) SetDeletedRecords(v *int64) { - o.DeletedRecords = v +func (o *ImportSummary) SetDeletedRecords(v ImportSummaryGetDeletedRecordsRetType) { + setImportSummaryGetDeletedRecordsAttributeType(&o.DeletedRecords, v) } // GetUpdatedRRSets returns the UpdatedRRSets field value if set, zero value otherwise. -func (o *ImportSummary) GetUpdatedRRSets() *int64 { - if o == nil || IsNil(o.UpdatedRRSets) { - var ret *int64 - return ret - } - return o.UpdatedRRSets +func (o *ImportSummary) GetUpdatedRRSets() (res ImportSummaryGetUpdatedRRSetsRetType) { + res, _ = o.GetUpdatedRRSetsOk() + return } // GetUpdatedRRSetsOk returns a tuple with the UpdatedRRSets field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ImportSummary) GetUpdatedRRSetsOk() (*int64, bool) { - if o == nil || IsNil(o.UpdatedRRSets) { - return nil, false - } - return o.UpdatedRRSets, true +func (o *ImportSummary) GetUpdatedRRSetsOk() (ret ImportSummaryGetUpdatedRRSetsRetType, ok bool) { + return getImportSummaryGetUpdatedRRSetsAttributeTypeOk(o.UpdatedRRSets) } // HasUpdatedRRSets returns a boolean if a field has been set. func (o *ImportSummary) HasUpdatedRRSets() bool { - if o != nil && !IsNil(o.UpdatedRRSets) { - return true - } - - return false + _, ok := o.GetUpdatedRRSetsOk() + return ok } // SetUpdatedRRSets gets a reference to the given int64 and assigns it to the UpdatedRRSets field. -func (o *ImportSummary) SetUpdatedRRSets(v *int64) { - o.UpdatedRRSets = v +func (o *ImportSummary) SetUpdatedRRSets(v ImportSummaryGetUpdatedRRSetsRetType) { + setImportSummaryGetUpdatedRRSetsAttributeType(&o.UpdatedRRSets, v) } // GetUpdatedRecords returns the UpdatedRecords field value if set, zero value otherwise. -func (o *ImportSummary) GetUpdatedRecords() *int64 { - if o == nil || IsNil(o.UpdatedRecords) { - var ret *int64 - return ret - } - return o.UpdatedRecords +func (o *ImportSummary) GetUpdatedRecords() (res ImportSummaryGetUpdatedRecordsRetType) { + res, _ = o.GetUpdatedRecordsOk() + return } // GetUpdatedRecordsOk returns a tuple with the UpdatedRecords field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ImportSummary) GetUpdatedRecordsOk() (*int64, bool) { - if o == nil || IsNil(o.UpdatedRecords) { - return nil, false - } - return o.UpdatedRecords, true +func (o *ImportSummary) GetUpdatedRecordsOk() (ret ImportSummaryGetUpdatedRecordsRetType, ok bool) { + return getImportSummaryGetUpdatedRecordsAttributeTypeOk(o.UpdatedRecords) } // HasUpdatedRecords returns a boolean if a field has been set. func (o *ImportSummary) HasUpdatedRecords() bool { - if o != nil && !IsNil(o.UpdatedRecords) { - return true - } - - return false + _, ok := o.GetUpdatedRecordsOk() + return ok } // SetUpdatedRecords gets a reference to the given int64 and assigns it to the UpdatedRecords field. -func (o *ImportSummary) SetUpdatedRecords(v *int64) { - o.UpdatedRecords = v +func (o *ImportSummary) SetUpdatedRecords(v ImportSummaryGetUpdatedRecordsRetType) { + setImportSummaryGetUpdatedRecordsAttributeType(&o.UpdatedRecords, v) } func (o ImportSummary) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.CreatedRRSets) { - toSerialize["createdRRSets"] = o.CreatedRRSets + if val, ok := getImportSummaryGetCreatedRRSetsAttributeTypeOk(o.CreatedRRSets); ok { + toSerialize["CreatedRRSets"] = val } - if !IsNil(o.CreatedRecords) { - toSerialize["createdRecords"] = o.CreatedRecords + if val, ok := getImportSummaryGetCreatedRecordsAttributeTypeOk(o.CreatedRecords); ok { + toSerialize["CreatedRecords"] = val } - if !IsNil(o.DeletedRRSets) { - toSerialize["deletedRRSets"] = o.DeletedRRSets + if val, ok := getImportSummaryGetDeletedRRSetsAttributeTypeOk(o.DeletedRRSets); ok { + toSerialize["DeletedRRSets"] = val } - if !IsNil(o.DeletedRecords) { - toSerialize["deletedRecords"] = o.DeletedRecords + if val, ok := getImportSummaryGetDeletedRecordsAttributeTypeOk(o.DeletedRecords); ok { + toSerialize["DeletedRecords"] = val } - if !IsNil(o.UpdatedRRSets) { - toSerialize["updatedRRSets"] = o.UpdatedRRSets + if val, ok := getImportSummaryGetUpdatedRRSetsAttributeTypeOk(o.UpdatedRRSets); ok { + toSerialize["UpdatedRRSets"] = val } - if !IsNil(o.UpdatedRecords) { - toSerialize["updatedRecords"] = o.UpdatedRecords + if val, ok := getImportSummaryGetUpdatedRecordsAttributeTypeOk(o.UpdatedRecords); ok { + toSerialize["UpdatedRecords"] = val } return toSerialize, nil } diff --git a/services/dns/model_label.go b/services/dns/model_label.go index 3d2a0fb0d..affe97856 100644 --- a/services/dns/model_label.go +++ b/services/dns/model_label.go @@ -17,12 +17,54 @@ import ( // checks if the Label type satisfies the MappedNullable interface at compile time var _ MappedNullable = &Label{} +/* + types and functions for key +*/ + +// isNotNullableString +type LabelGetKeyAttributeType = *string + +func getLabelGetKeyAttributeTypeOk(arg LabelGetKeyAttributeType) (ret LabelGetKeyRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setLabelGetKeyAttributeType(arg *LabelGetKeyAttributeType, val LabelGetKeyRetType) { + *arg = &val +} + +type LabelGetKeyArgType = string +type LabelGetKeyRetType = string + +/* + types and functions for value +*/ + +// isNotNullableString +type LabelGetValueAttributeType = *string + +func getLabelGetValueAttributeTypeOk(arg LabelGetValueAttributeType) (ret LabelGetValueRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setLabelGetValueAttributeType(arg *LabelGetValueAttributeType, val LabelGetValueRetType) { + *arg = &val +} + +type LabelGetValueArgType = string +type LabelGetValueRetType = string + // Label struct for Label type Label struct { // REQUIRED - Key *string `json:"key"` + Key LabelGetKeyAttributeType `json:"key"` // REQUIRED - Value *string `json:"value"` + Value LabelGetValueAttributeType `json:"value"` } type _Label Label @@ -31,10 +73,10 @@ type _Label Label // 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 NewLabel(key *string, value *string) *Label { +func NewLabel(key LabelGetKeyArgType, value LabelGetValueArgType) *Label { this := Label{} - this.Key = key - this.Value = value + setLabelGetKeyAttributeType(&this.Key, key) + setLabelGetValueAttributeType(&this.Value, value) return &this } @@ -47,57 +89,47 @@ func NewLabelWithDefaults() *Label { } // GetKey returns the Key field value -func (o *Label) GetKey() *string { - if o == nil || IsNil(o.Key) { - var ret *string - return ret - } - - return o.Key +func (o *Label) GetKey() (ret LabelGetKeyRetType) { + ret, _ = o.GetKeyOk() + return ret } // GetKeyOk returns a tuple with the Key field value // and a boolean to check if the value has been set. -func (o *Label) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Key, true +func (o *Label) GetKeyOk() (ret LabelGetKeyRetType, ok bool) { + return getLabelGetKeyAttributeTypeOk(o.Key) } // SetKey sets field value -func (o *Label) SetKey(v *string) { - o.Key = v +func (o *Label) SetKey(v LabelGetKeyRetType) { + setLabelGetKeyAttributeType(&o.Key, v) } // GetValue returns the Value field value -func (o *Label) GetValue() *string { - if o == nil || IsNil(o.Value) { - var ret *string - return ret - } - - return o.Value +func (o *Label) GetValue() (ret LabelGetValueRetType) { + ret, _ = o.GetValueOk() + return ret } // GetValueOk returns a tuple with the Value field value // and a boolean to check if the value has been set. -func (o *Label) GetValueOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Value, true +func (o *Label) GetValueOk() (ret LabelGetValueRetType, ok bool) { + return getLabelGetValueAttributeTypeOk(o.Value) } // SetValue sets field value -func (o *Label) SetValue(v *string) { - o.Value = v +func (o *Label) SetValue(v LabelGetValueRetType) { + setLabelGetValueAttributeType(&o.Value, v) } func (o Label) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - toSerialize["value"] = o.Value + if val, ok := getLabelGetKeyAttributeTypeOk(o.Key); ok { + toSerialize["Key"] = val + } + if val, ok := getLabelGetValueAttributeTypeOk(o.Value); ok { + toSerialize["Value"] = val + } return toSerialize, nil } diff --git a/services/dns/model_list_labels_response.go b/services/dns/model_list_labels_response.go index 30531d4b1..64ebbdb22 100644 --- a/services/dns/model_list_labels_response.go +++ b/services/dns/model_list_labels_response.go @@ -17,10 +17,51 @@ import ( // checks if the ListLabelsResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ListLabelsResponse{} +/* + types and functions for labels +*/ + +// isArray +type ListLabelsResponseGetLabelsAttributeType = *[]Label +type ListLabelsResponseGetLabelsArgType = []Label +type ListLabelsResponseGetLabelsRetType = []Label + +func getListLabelsResponseGetLabelsAttributeTypeOk(arg ListLabelsResponseGetLabelsAttributeType) (ret ListLabelsResponseGetLabelsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListLabelsResponseGetLabelsAttributeType(arg *ListLabelsResponseGetLabelsAttributeType, val ListLabelsResponseGetLabelsRetType) { + *arg = &val +} + +/* + types and functions for message +*/ + +// isNotNullableString +type ListLabelsResponseGetMessageAttributeType = *string + +func getListLabelsResponseGetMessageAttributeTypeOk(arg ListLabelsResponseGetMessageAttributeType) (ret ListLabelsResponseGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListLabelsResponseGetMessageAttributeType(arg *ListLabelsResponseGetMessageAttributeType, val ListLabelsResponseGetMessageRetType) { + *arg = &val +} + +type ListLabelsResponseGetMessageArgType = string +type ListLabelsResponseGetMessageRetType = string + // ListLabelsResponse ResponseAllLabels. type ListLabelsResponse struct { - Labels *[]Label `json:"labels,omitempty"` - Message *string `json:"message,omitempty"` + Labels ListLabelsResponseGetLabelsAttributeType `json:"labels,omitempty"` + Message ListLabelsResponseGetMessageAttributeType `json:"message,omitempty"` } // NewListLabelsResponse instantiates a new ListLabelsResponse object @@ -41,76 +82,58 @@ func NewListLabelsResponseWithDefaults() *ListLabelsResponse { } // GetLabels returns the Labels field value if set, zero value otherwise. -func (o *ListLabelsResponse) GetLabels() *[]Label { - if o == nil || IsNil(o.Labels) { - var ret *[]Label - return ret - } - return o.Labels +func (o *ListLabelsResponse) GetLabels() (res ListLabelsResponseGetLabelsRetType) { + res, _ = o.GetLabelsOk() + return } // GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ListLabelsResponse) GetLabelsOk() (*[]Label, bool) { - if o == nil || IsNil(o.Labels) { - return nil, false - } - return o.Labels, true +func (o *ListLabelsResponse) GetLabelsOk() (ret ListLabelsResponseGetLabelsRetType, ok bool) { + return getListLabelsResponseGetLabelsAttributeTypeOk(o.Labels) } // HasLabels returns a boolean if a field has been set. func (o *ListLabelsResponse) HasLabels() bool { - if o != nil && !IsNil(o.Labels) { - return true - } - - return false + _, ok := o.GetLabelsOk() + return ok } // SetLabels gets a reference to the given []Label and assigns it to the Labels field. -func (o *ListLabelsResponse) SetLabels(v *[]Label) { - o.Labels = v +func (o *ListLabelsResponse) SetLabels(v ListLabelsResponseGetLabelsRetType) { + setListLabelsResponseGetLabelsAttributeType(&o.Labels, v) } // GetMessage returns the Message field value if set, zero value otherwise. -func (o *ListLabelsResponse) GetMessage() *string { - if o == nil || IsNil(o.Message) { - var ret *string - return ret - } - return o.Message +func (o *ListLabelsResponse) GetMessage() (res ListLabelsResponseGetMessageRetType) { + res, _ = o.GetMessageOk() + return } // GetMessageOk returns a tuple with the Message field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ListLabelsResponse) GetMessageOk() (*string, bool) { - if o == nil || IsNil(o.Message) { - return nil, false - } - return o.Message, true +func (o *ListLabelsResponse) GetMessageOk() (ret ListLabelsResponseGetMessageRetType, ok bool) { + return getListLabelsResponseGetMessageAttributeTypeOk(o.Message) } // HasMessage returns a boolean if a field has been set. func (o *ListLabelsResponse) HasMessage() bool { - if o != nil && !IsNil(o.Message) { - return true - } - - return false + _, ok := o.GetMessageOk() + return ok } // SetMessage gets a reference to the given string and assigns it to the Message field. -func (o *ListLabelsResponse) SetMessage(v *string) { - o.Message = v +func (o *ListLabelsResponse) SetMessage(v ListLabelsResponseGetMessageRetType) { + setListLabelsResponseGetMessageAttributeType(&o.Message, v) } func (o ListLabelsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Labels) { - toSerialize["labels"] = o.Labels + if val, ok := getListLabelsResponseGetLabelsAttributeTypeOk(o.Labels); ok { + toSerialize["Labels"] = val } - if !IsNil(o.Message) { - toSerialize["message"] = o.Message + if val, ok := getListLabelsResponseGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val } return toSerialize, nil } diff --git a/services/dns/model_list_record_sets_response.go b/services/dns/model_list_record_sets_response.go index f2e0c38f5..c6b73cfc6 100644 --- a/services/dns/model_list_record_sets_response.go +++ b/services/dns/model_list_record_sets_response.go @@ -17,17 +17,121 @@ import ( // checks if the ListRecordSetsResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ListRecordSetsResponse{} +/* + types and functions for itemsPerPage +*/ + +// isInteger +type ListRecordSetsResponseGetItemsPerPageAttributeType = *int64 +type ListRecordSetsResponseGetItemsPerPageArgType = int64 +type ListRecordSetsResponseGetItemsPerPageRetType = int64 + +func getListRecordSetsResponseGetItemsPerPageAttributeTypeOk(arg ListRecordSetsResponseGetItemsPerPageAttributeType) (ret ListRecordSetsResponseGetItemsPerPageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListRecordSetsResponseGetItemsPerPageAttributeType(arg *ListRecordSetsResponseGetItemsPerPageAttributeType, val ListRecordSetsResponseGetItemsPerPageRetType) { + *arg = &val +} + +/* + types and functions for message +*/ + +// isNotNullableString +type ListRecordSetsResponseGetMessageAttributeType = *string + +func getListRecordSetsResponseGetMessageAttributeTypeOk(arg ListRecordSetsResponseGetMessageAttributeType) (ret ListRecordSetsResponseGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListRecordSetsResponseGetMessageAttributeType(arg *ListRecordSetsResponseGetMessageAttributeType, val ListRecordSetsResponseGetMessageRetType) { + *arg = &val +} + +type ListRecordSetsResponseGetMessageArgType = string +type ListRecordSetsResponseGetMessageRetType = string + +/* + types and functions for rrSets +*/ + +// isArray +type ListRecordSetsResponseGetRrSetsAttributeType = *[]RecordSet +type ListRecordSetsResponseGetRrSetsArgType = []RecordSet +type ListRecordSetsResponseGetRrSetsRetType = []RecordSet + +func getListRecordSetsResponseGetRrSetsAttributeTypeOk(arg ListRecordSetsResponseGetRrSetsAttributeType) (ret ListRecordSetsResponseGetRrSetsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListRecordSetsResponseGetRrSetsAttributeType(arg *ListRecordSetsResponseGetRrSetsAttributeType, val ListRecordSetsResponseGetRrSetsRetType) { + *arg = &val +} + +/* + types and functions for totalItems +*/ + +// isInteger +type ListRecordSetsResponseGetTotalItemsAttributeType = *int64 +type ListRecordSetsResponseGetTotalItemsArgType = int64 +type ListRecordSetsResponseGetTotalItemsRetType = int64 + +func getListRecordSetsResponseGetTotalItemsAttributeTypeOk(arg ListRecordSetsResponseGetTotalItemsAttributeType) (ret ListRecordSetsResponseGetTotalItemsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListRecordSetsResponseGetTotalItemsAttributeType(arg *ListRecordSetsResponseGetTotalItemsAttributeType, val ListRecordSetsResponseGetTotalItemsRetType) { + *arg = &val +} + +/* + types and functions for totalPages +*/ + +// isInteger +type ListRecordSetsResponseGetTotalPagesAttributeType = *int64 +type ListRecordSetsResponseGetTotalPagesArgType = int64 +type ListRecordSetsResponseGetTotalPagesRetType = int64 + +func getListRecordSetsResponseGetTotalPagesAttributeTypeOk(arg ListRecordSetsResponseGetTotalPagesAttributeType) (ret ListRecordSetsResponseGetTotalPagesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListRecordSetsResponseGetTotalPagesAttributeType(arg *ListRecordSetsResponseGetTotalPagesAttributeType, val ListRecordSetsResponseGetTotalPagesRetType) { + *arg = &val +} + // ListRecordSetsResponse ResponseRRSetAll. type ListRecordSetsResponse struct { + // Can be cast to int32 without loss of precision. // REQUIRED - ItemsPerPage *int64 `json:"itemsPerPage"` - Message *string `json:"message,omitempty"` + ItemsPerPage ListRecordSetsResponseGetItemsPerPageAttributeType `json:"itemsPerPage"` + Message ListRecordSetsResponseGetMessageAttributeType `json:"message,omitempty"` // REQUIRED - RrSets *[]RecordSet `json:"rrSets"` + RrSets ListRecordSetsResponseGetRrSetsAttributeType `json:"rrSets"` + // Can be cast to int32 without loss of precision. // REQUIRED - TotalItems *int64 `json:"totalItems"` + TotalItems ListRecordSetsResponseGetTotalItemsAttributeType `json:"totalItems"` + // Can be cast to int32 without loss of precision. // REQUIRED - TotalPages *int64 `json:"totalPages"` + TotalPages ListRecordSetsResponseGetTotalPagesAttributeType `json:"totalPages"` } type _ListRecordSetsResponse ListRecordSetsResponse @@ -36,12 +140,12 @@ type _ListRecordSetsResponse ListRecordSetsResponse // 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 NewListRecordSetsResponse(itemsPerPage *int64, rrSets *[]RecordSet, totalItems *int64, totalPages *int64) *ListRecordSetsResponse { +func NewListRecordSetsResponse(itemsPerPage ListRecordSetsResponseGetItemsPerPageArgType, rrSets ListRecordSetsResponseGetRrSetsArgType, totalItems ListRecordSetsResponseGetTotalItemsArgType, totalPages ListRecordSetsResponseGetTotalPagesArgType) *ListRecordSetsResponse { this := ListRecordSetsResponse{} - this.ItemsPerPage = itemsPerPage - this.RrSets = rrSets - this.TotalItems = totalItems - this.TotalPages = totalPages + setListRecordSetsResponseGetItemsPerPageAttributeType(&this.ItemsPerPage, itemsPerPage) + setListRecordSetsResponseGetRrSetsAttributeType(&this.RrSets, rrSets) + setListRecordSetsResponseGetTotalItemsAttributeType(&this.TotalItems, totalItems) + setListRecordSetsResponseGetTotalPagesAttributeType(&this.TotalPages, totalPages) return &this } @@ -54,142 +158,113 @@ func NewListRecordSetsResponseWithDefaults() *ListRecordSetsResponse { } // GetItemsPerPage returns the ItemsPerPage field value -func (o *ListRecordSetsResponse) GetItemsPerPage() *int64 { - if o == nil || IsNil(o.ItemsPerPage) { - var ret *int64 - return ret - } - - return o.ItemsPerPage +func (o *ListRecordSetsResponse) GetItemsPerPage() (ret ListRecordSetsResponseGetItemsPerPageRetType) { + ret, _ = o.GetItemsPerPageOk() + return ret } // GetItemsPerPageOk returns a tuple with the ItemsPerPage field value // and a boolean to check if the value has been set. -func (o *ListRecordSetsResponse) GetItemsPerPageOk() (*int64, bool) { - if o == nil { - return nil, false - } - return o.ItemsPerPage, true +func (o *ListRecordSetsResponse) GetItemsPerPageOk() (ret ListRecordSetsResponseGetItemsPerPageRetType, ok bool) { + return getListRecordSetsResponseGetItemsPerPageAttributeTypeOk(o.ItemsPerPage) } // SetItemsPerPage sets field value -func (o *ListRecordSetsResponse) SetItemsPerPage(v *int64) { - o.ItemsPerPage = v +func (o *ListRecordSetsResponse) SetItemsPerPage(v ListRecordSetsResponseGetItemsPerPageRetType) { + setListRecordSetsResponseGetItemsPerPageAttributeType(&o.ItemsPerPage, v) } // GetMessage returns the Message field value if set, zero value otherwise. -func (o *ListRecordSetsResponse) GetMessage() *string { - if o == nil || IsNil(o.Message) { - var ret *string - return ret - } - return o.Message +func (o *ListRecordSetsResponse) GetMessage() (res ListRecordSetsResponseGetMessageRetType) { + res, _ = o.GetMessageOk() + return } // GetMessageOk returns a tuple with the Message field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ListRecordSetsResponse) GetMessageOk() (*string, bool) { - if o == nil || IsNil(o.Message) { - return nil, false - } - return o.Message, true +func (o *ListRecordSetsResponse) GetMessageOk() (ret ListRecordSetsResponseGetMessageRetType, ok bool) { + return getListRecordSetsResponseGetMessageAttributeTypeOk(o.Message) } // HasMessage returns a boolean if a field has been set. func (o *ListRecordSetsResponse) HasMessage() bool { - if o != nil && !IsNil(o.Message) { - return true - } - - return false + _, ok := o.GetMessageOk() + return ok } // SetMessage gets a reference to the given string and assigns it to the Message field. -func (o *ListRecordSetsResponse) SetMessage(v *string) { - o.Message = v +func (o *ListRecordSetsResponse) SetMessage(v ListRecordSetsResponseGetMessageRetType) { + setListRecordSetsResponseGetMessageAttributeType(&o.Message, v) } // GetRrSets returns the RrSets field value -func (o *ListRecordSetsResponse) GetRrSets() *[]RecordSet { - if o == nil || IsNil(o.RrSets) { - var ret *[]RecordSet - return ret - } - - return o.RrSets +func (o *ListRecordSetsResponse) GetRrSets() (ret ListRecordSetsResponseGetRrSetsRetType) { + ret, _ = o.GetRrSetsOk() + return ret } // GetRrSetsOk returns a tuple with the RrSets field value // and a boolean to check if the value has been set. -func (o *ListRecordSetsResponse) GetRrSetsOk() (*[]RecordSet, bool) { - if o == nil { - return nil, false - } - return o.RrSets, true +func (o *ListRecordSetsResponse) GetRrSetsOk() (ret ListRecordSetsResponseGetRrSetsRetType, ok bool) { + return getListRecordSetsResponseGetRrSetsAttributeTypeOk(o.RrSets) } // SetRrSets sets field value -func (o *ListRecordSetsResponse) SetRrSets(v *[]RecordSet) { - o.RrSets = v +func (o *ListRecordSetsResponse) SetRrSets(v ListRecordSetsResponseGetRrSetsRetType) { + setListRecordSetsResponseGetRrSetsAttributeType(&o.RrSets, v) } // GetTotalItems returns the TotalItems field value -func (o *ListRecordSetsResponse) GetTotalItems() *int64 { - if o == nil || IsNil(o.TotalItems) { - var ret *int64 - return ret - } - - return o.TotalItems +func (o *ListRecordSetsResponse) GetTotalItems() (ret ListRecordSetsResponseGetTotalItemsRetType) { + ret, _ = o.GetTotalItemsOk() + return ret } // GetTotalItemsOk returns a tuple with the TotalItems field value // and a boolean to check if the value has been set. -func (o *ListRecordSetsResponse) GetTotalItemsOk() (*int64, bool) { - if o == nil { - return nil, false - } - return o.TotalItems, true +func (o *ListRecordSetsResponse) GetTotalItemsOk() (ret ListRecordSetsResponseGetTotalItemsRetType, ok bool) { + return getListRecordSetsResponseGetTotalItemsAttributeTypeOk(o.TotalItems) } // SetTotalItems sets field value -func (o *ListRecordSetsResponse) SetTotalItems(v *int64) { - o.TotalItems = v +func (o *ListRecordSetsResponse) SetTotalItems(v ListRecordSetsResponseGetTotalItemsRetType) { + setListRecordSetsResponseGetTotalItemsAttributeType(&o.TotalItems, v) } // GetTotalPages returns the TotalPages field value -func (o *ListRecordSetsResponse) GetTotalPages() *int64 { - if o == nil || IsNil(o.TotalPages) { - var ret *int64 - return ret - } - - return o.TotalPages +func (o *ListRecordSetsResponse) GetTotalPages() (ret ListRecordSetsResponseGetTotalPagesRetType) { + ret, _ = o.GetTotalPagesOk() + return ret } // GetTotalPagesOk returns a tuple with the TotalPages field value // and a boolean to check if the value has been set. -func (o *ListRecordSetsResponse) GetTotalPagesOk() (*int64, bool) { - if o == nil { - return nil, false - } - return o.TotalPages, true +func (o *ListRecordSetsResponse) GetTotalPagesOk() (ret ListRecordSetsResponseGetTotalPagesRetType, ok bool) { + return getListRecordSetsResponseGetTotalPagesAttributeTypeOk(o.TotalPages) } // SetTotalPages sets field value -func (o *ListRecordSetsResponse) SetTotalPages(v *int64) { - o.TotalPages = v +func (o *ListRecordSetsResponse) SetTotalPages(v ListRecordSetsResponseGetTotalPagesRetType) { + setListRecordSetsResponseGetTotalPagesAttributeType(&o.TotalPages, v) } func (o ListRecordSetsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["itemsPerPage"] = o.ItemsPerPage - if !IsNil(o.Message) { - toSerialize["message"] = o.Message + if val, ok := getListRecordSetsResponseGetItemsPerPageAttributeTypeOk(o.ItemsPerPage); ok { + toSerialize["ItemsPerPage"] = val + } + if val, ok := getListRecordSetsResponseGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val + } + if val, ok := getListRecordSetsResponseGetRrSetsAttributeTypeOk(o.RrSets); ok { + toSerialize["RrSets"] = val + } + if val, ok := getListRecordSetsResponseGetTotalItemsAttributeTypeOk(o.TotalItems); ok { + toSerialize["TotalItems"] = val + } + if val, ok := getListRecordSetsResponseGetTotalPagesAttributeTypeOk(o.TotalPages); ok { + toSerialize["TotalPages"] = val } - toSerialize["rrSets"] = o.RrSets - toSerialize["totalItems"] = o.TotalItems - toSerialize["totalPages"] = o.TotalPages return toSerialize, nil } diff --git a/services/dns/model_list_zones_response.go b/services/dns/model_list_zones_response.go index efc7f7b14..4dbc3187b 100644 --- a/services/dns/model_list_zones_response.go +++ b/services/dns/model_list_zones_response.go @@ -17,17 +17,121 @@ import ( // checks if the ListZonesResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ListZonesResponse{} +/* + types and functions for itemsPerPage +*/ + +// isInteger +type ListZonesResponseGetItemsPerPageAttributeType = *int64 +type ListZonesResponseGetItemsPerPageArgType = int64 +type ListZonesResponseGetItemsPerPageRetType = int64 + +func getListZonesResponseGetItemsPerPageAttributeTypeOk(arg ListZonesResponseGetItemsPerPageAttributeType) (ret ListZonesResponseGetItemsPerPageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListZonesResponseGetItemsPerPageAttributeType(arg *ListZonesResponseGetItemsPerPageAttributeType, val ListZonesResponseGetItemsPerPageRetType) { + *arg = &val +} + +/* + types and functions for message +*/ + +// isNotNullableString +type ListZonesResponseGetMessageAttributeType = *string + +func getListZonesResponseGetMessageAttributeTypeOk(arg ListZonesResponseGetMessageAttributeType) (ret ListZonesResponseGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListZonesResponseGetMessageAttributeType(arg *ListZonesResponseGetMessageAttributeType, val ListZonesResponseGetMessageRetType) { + *arg = &val +} + +type ListZonesResponseGetMessageArgType = string +type ListZonesResponseGetMessageRetType = string + +/* + types and functions for totalItems +*/ + +// isInteger +type ListZonesResponseGetTotalItemsAttributeType = *int64 +type ListZonesResponseGetTotalItemsArgType = int64 +type ListZonesResponseGetTotalItemsRetType = int64 + +func getListZonesResponseGetTotalItemsAttributeTypeOk(arg ListZonesResponseGetTotalItemsAttributeType) (ret ListZonesResponseGetTotalItemsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListZonesResponseGetTotalItemsAttributeType(arg *ListZonesResponseGetTotalItemsAttributeType, val ListZonesResponseGetTotalItemsRetType) { + *arg = &val +} + +/* + types and functions for totalPages +*/ + +// isInteger +type ListZonesResponseGetTotalPagesAttributeType = *int64 +type ListZonesResponseGetTotalPagesArgType = int64 +type ListZonesResponseGetTotalPagesRetType = int64 + +func getListZonesResponseGetTotalPagesAttributeTypeOk(arg ListZonesResponseGetTotalPagesAttributeType) (ret ListZonesResponseGetTotalPagesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListZonesResponseGetTotalPagesAttributeType(arg *ListZonesResponseGetTotalPagesAttributeType, val ListZonesResponseGetTotalPagesRetType) { + *arg = &val +} + +/* + types and functions for zones +*/ + +// isArray +type ListZonesResponseGetZonesAttributeType = *[]Zone +type ListZonesResponseGetZonesArgType = []Zone +type ListZonesResponseGetZonesRetType = []Zone + +func getListZonesResponseGetZonesAttributeTypeOk(arg ListZonesResponseGetZonesAttributeType) (ret ListZonesResponseGetZonesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListZonesResponseGetZonesAttributeType(arg *ListZonesResponseGetZonesAttributeType, val ListZonesResponseGetZonesRetType) { + *arg = &val +} + // ListZonesResponse ResponseZoneAll for filtered zones. type ListZonesResponse struct { + // Can be cast to int32 without loss of precision. // REQUIRED - ItemsPerPage *int64 `json:"itemsPerPage"` - Message *string `json:"message,omitempty"` + ItemsPerPage ListZonesResponseGetItemsPerPageAttributeType `json:"itemsPerPage"` + Message ListZonesResponseGetMessageAttributeType `json:"message,omitempty"` + // Can be cast to int32 without loss of precision. // REQUIRED - TotalItems *int64 `json:"totalItems"` + TotalItems ListZonesResponseGetTotalItemsAttributeType `json:"totalItems"` + // Can be cast to int32 without loss of precision. // REQUIRED - TotalPages *int64 `json:"totalPages"` + TotalPages ListZonesResponseGetTotalPagesAttributeType `json:"totalPages"` // REQUIRED - Zones *[]Zone `json:"zones"` + Zones ListZonesResponseGetZonesAttributeType `json:"zones"` } type _ListZonesResponse ListZonesResponse @@ -36,12 +140,12 @@ type _ListZonesResponse ListZonesResponse // 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 NewListZonesResponse(itemsPerPage *int64, totalItems *int64, totalPages *int64, zones *[]Zone) *ListZonesResponse { +func NewListZonesResponse(itemsPerPage ListZonesResponseGetItemsPerPageArgType, totalItems ListZonesResponseGetTotalItemsArgType, totalPages ListZonesResponseGetTotalPagesArgType, zones ListZonesResponseGetZonesArgType) *ListZonesResponse { this := ListZonesResponse{} - this.ItemsPerPage = itemsPerPage - this.TotalItems = totalItems - this.TotalPages = totalPages - this.Zones = zones + setListZonesResponseGetItemsPerPageAttributeType(&this.ItemsPerPage, itemsPerPage) + setListZonesResponseGetTotalItemsAttributeType(&this.TotalItems, totalItems) + setListZonesResponseGetTotalPagesAttributeType(&this.TotalPages, totalPages) + setListZonesResponseGetZonesAttributeType(&this.Zones, zones) return &this } @@ -54,142 +158,113 @@ func NewListZonesResponseWithDefaults() *ListZonesResponse { } // GetItemsPerPage returns the ItemsPerPage field value -func (o *ListZonesResponse) GetItemsPerPage() *int64 { - if o == nil || IsNil(o.ItemsPerPage) { - var ret *int64 - return ret - } - - return o.ItemsPerPage +func (o *ListZonesResponse) GetItemsPerPage() (ret ListZonesResponseGetItemsPerPageRetType) { + ret, _ = o.GetItemsPerPageOk() + return ret } // GetItemsPerPageOk returns a tuple with the ItemsPerPage field value // and a boolean to check if the value has been set. -func (o *ListZonesResponse) GetItemsPerPageOk() (*int64, bool) { - if o == nil { - return nil, false - } - return o.ItemsPerPage, true +func (o *ListZonesResponse) GetItemsPerPageOk() (ret ListZonesResponseGetItemsPerPageRetType, ok bool) { + return getListZonesResponseGetItemsPerPageAttributeTypeOk(o.ItemsPerPage) } // SetItemsPerPage sets field value -func (o *ListZonesResponse) SetItemsPerPage(v *int64) { - o.ItemsPerPage = v +func (o *ListZonesResponse) SetItemsPerPage(v ListZonesResponseGetItemsPerPageRetType) { + setListZonesResponseGetItemsPerPageAttributeType(&o.ItemsPerPage, v) } // GetMessage returns the Message field value if set, zero value otherwise. -func (o *ListZonesResponse) GetMessage() *string { - if o == nil || IsNil(o.Message) { - var ret *string - return ret - } - return o.Message +func (o *ListZonesResponse) GetMessage() (res ListZonesResponseGetMessageRetType) { + res, _ = o.GetMessageOk() + return } // GetMessageOk returns a tuple with the Message field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ListZonesResponse) GetMessageOk() (*string, bool) { - if o == nil || IsNil(o.Message) { - return nil, false - } - return o.Message, true +func (o *ListZonesResponse) GetMessageOk() (ret ListZonesResponseGetMessageRetType, ok bool) { + return getListZonesResponseGetMessageAttributeTypeOk(o.Message) } // HasMessage returns a boolean if a field has been set. func (o *ListZonesResponse) HasMessage() bool { - if o != nil && !IsNil(o.Message) { - return true - } - - return false + _, ok := o.GetMessageOk() + return ok } // SetMessage gets a reference to the given string and assigns it to the Message field. -func (o *ListZonesResponse) SetMessage(v *string) { - o.Message = v +func (o *ListZonesResponse) SetMessage(v ListZonesResponseGetMessageRetType) { + setListZonesResponseGetMessageAttributeType(&o.Message, v) } // GetTotalItems returns the TotalItems field value -func (o *ListZonesResponse) GetTotalItems() *int64 { - if o == nil || IsNil(o.TotalItems) { - var ret *int64 - return ret - } - - return o.TotalItems +func (o *ListZonesResponse) GetTotalItems() (ret ListZonesResponseGetTotalItemsRetType) { + ret, _ = o.GetTotalItemsOk() + return ret } // GetTotalItemsOk returns a tuple with the TotalItems field value // and a boolean to check if the value has been set. -func (o *ListZonesResponse) GetTotalItemsOk() (*int64, bool) { - if o == nil { - return nil, false - } - return o.TotalItems, true +func (o *ListZonesResponse) GetTotalItemsOk() (ret ListZonesResponseGetTotalItemsRetType, ok bool) { + return getListZonesResponseGetTotalItemsAttributeTypeOk(o.TotalItems) } // SetTotalItems sets field value -func (o *ListZonesResponse) SetTotalItems(v *int64) { - o.TotalItems = v +func (o *ListZonesResponse) SetTotalItems(v ListZonesResponseGetTotalItemsRetType) { + setListZonesResponseGetTotalItemsAttributeType(&o.TotalItems, v) } // GetTotalPages returns the TotalPages field value -func (o *ListZonesResponse) GetTotalPages() *int64 { - if o == nil || IsNil(o.TotalPages) { - var ret *int64 - return ret - } - - return o.TotalPages +func (o *ListZonesResponse) GetTotalPages() (ret ListZonesResponseGetTotalPagesRetType) { + ret, _ = o.GetTotalPagesOk() + return ret } // GetTotalPagesOk returns a tuple with the TotalPages field value // and a boolean to check if the value has been set. -func (o *ListZonesResponse) GetTotalPagesOk() (*int64, bool) { - if o == nil { - return nil, false - } - return o.TotalPages, true +func (o *ListZonesResponse) GetTotalPagesOk() (ret ListZonesResponseGetTotalPagesRetType, ok bool) { + return getListZonesResponseGetTotalPagesAttributeTypeOk(o.TotalPages) } // SetTotalPages sets field value -func (o *ListZonesResponse) SetTotalPages(v *int64) { - o.TotalPages = v +func (o *ListZonesResponse) SetTotalPages(v ListZonesResponseGetTotalPagesRetType) { + setListZonesResponseGetTotalPagesAttributeType(&o.TotalPages, v) } // GetZones returns the Zones field value -func (o *ListZonesResponse) GetZones() *[]Zone { - if o == nil || IsNil(o.Zones) { - var ret *[]Zone - return ret - } - - return o.Zones +func (o *ListZonesResponse) GetZones() (ret ListZonesResponseGetZonesRetType) { + ret, _ = o.GetZonesOk() + return ret } // GetZonesOk returns a tuple with the Zones field value // and a boolean to check if the value has been set. -func (o *ListZonesResponse) GetZonesOk() (*[]Zone, bool) { - if o == nil { - return nil, false - } - return o.Zones, true +func (o *ListZonesResponse) GetZonesOk() (ret ListZonesResponseGetZonesRetType, ok bool) { + return getListZonesResponseGetZonesAttributeTypeOk(o.Zones) } // SetZones sets field value -func (o *ListZonesResponse) SetZones(v *[]Zone) { - o.Zones = v +func (o *ListZonesResponse) SetZones(v ListZonesResponseGetZonesRetType) { + setListZonesResponseGetZonesAttributeType(&o.Zones, v) } func (o ListZonesResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["itemsPerPage"] = o.ItemsPerPage - if !IsNil(o.Message) { - toSerialize["message"] = o.Message + if val, ok := getListZonesResponseGetItemsPerPageAttributeTypeOk(o.ItemsPerPage); ok { + toSerialize["ItemsPerPage"] = val + } + if val, ok := getListZonesResponseGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val + } + if val, ok := getListZonesResponseGetTotalItemsAttributeTypeOk(o.TotalItems); ok { + toSerialize["TotalItems"] = val + } + if val, ok := getListZonesResponseGetTotalPagesAttributeTypeOk(o.TotalPages); ok { + toSerialize["TotalPages"] = val + } + if val, ok := getListZonesResponseGetZonesAttributeTypeOk(o.Zones); ok { + toSerialize["Zones"] = val } - toSerialize["totalItems"] = o.TotalItems - toSerialize["totalPages"] = o.TotalPages - toSerialize["zones"] = o.Zones return toSerialize, nil } diff --git a/services/dns/model_message.go b/services/dns/model_message.go index 7a8daac3e..6e29cc0fc 100644 --- a/services/dns/model_message.go +++ b/services/dns/model_message.go @@ -17,9 +17,30 @@ import ( // checks if the Message type satisfies the MappedNullable interface at compile time var _ MappedNullable = &Message{} +/* + types and functions for message +*/ + +// isNotNullableString +type MessageGetMessageAttributeType = *string + +func getMessageGetMessageAttributeTypeOk(arg MessageGetMessageAttributeType) (ret MessageGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setMessageGetMessageAttributeType(arg *MessageGetMessageAttributeType, val MessageGetMessageRetType) { + *arg = &val +} + +type MessageGetMessageArgType = string +type MessageGetMessageRetType = string + // Message struct for Message type Message struct { - Message *string `json:"message,omitempty"` + Message MessageGetMessageAttributeType `json:"message,omitempty"` } // NewMessage instantiates a new Message object @@ -40,41 +61,32 @@ func NewMessageWithDefaults() *Message { } // GetMessage returns the Message field value if set, zero value otherwise. -func (o *Message) GetMessage() *string { - if o == nil || IsNil(o.Message) { - var ret *string - return ret - } - return o.Message +func (o *Message) GetMessage() (res MessageGetMessageRetType) { + res, _ = o.GetMessageOk() + return } // GetMessageOk returns a tuple with the Message field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Message) GetMessageOk() (*string, bool) { - if o == nil || IsNil(o.Message) { - return nil, false - } - return o.Message, true +func (o *Message) GetMessageOk() (ret MessageGetMessageRetType, ok bool) { + return getMessageGetMessageAttributeTypeOk(o.Message) } // HasMessage returns a boolean if a field has been set. func (o *Message) HasMessage() bool { - if o != nil && !IsNil(o.Message) { - return true - } - - return false + _, ok := o.GetMessageOk() + return ok } // SetMessage gets a reference to the given string and assigns it to the Message field. -func (o *Message) SetMessage(v *string) { - o.Message = v +func (o *Message) SetMessage(v MessageGetMessageRetType) { + setMessageGetMessageAttributeType(&o.Message, v) } func (o Message) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Message) { - toSerialize["message"] = o.Message + if val, ok := getMessageGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val } return toSerialize, nil } diff --git a/services/dns/model_move_code_response.go b/services/dns/model_move_code_response.go index 33c350e87..005c706c1 100644 --- a/services/dns/model_move_code_response.go +++ b/services/dns/model_move_code_response.go @@ -17,16 +17,79 @@ import ( // checks if the MoveCodeResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &MoveCodeResponse{} +/* + types and functions for code +*/ + +// isNotNullableString +type MoveCodeResponseGetCodeAttributeType = *string + +func getMoveCodeResponseGetCodeAttributeTypeOk(arg MoveCodeResponseGetCodeAttributeType) (ret MoveCodeResponseGetCodeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setMoveCodeResponseGetCodeAttributeType(arg *MoveCodeResponseGetCodeAttributeType, val MoveCodeResponseGetCodeRetType) { + *arg = &val +} + +type MoveCodeResponseGetCodeArgType = string +type MoveCodeResponseGetCodeRetType = string + +/* + types and functions for expiresAt +*/ + +// isNotNullableString +type MoveCodeResponseGetExpiresAtAttributeType = *string + +func getMoveCodeResponseGetExpiresAtAttributeTypeOk(arg MoveCodeResponseGetExpiresAtAttributeType) (ret MoveCodeResponseGetExpiresAtRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setMoveCodeResponseGetExpiresAtAttributeType(arg *MoveCodeResponseGetExpiresAtAttributeType, val MoveCodeResponseGetExpiresAtRetType) { + *arg = &val +} + +type MoveCodeResponseGetExpiresAtArgType = string +type MoveCodeResponseGetExpiresAtRetType = string + +/* + types and functions for message +*/ + +// isNotNullableString +type MoveCodeResponseGetMessageAttributeType = *string + +func getMoveCodeResponseGetMessageAttributeTypeOk(arg MoveCodeResponseGetMessageAttributeType) (ret MoveCodeResponseGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setMoveCodeResponseGetMessageAttributeType(arg *MoveCodeResponseGetMessageAttributeType, val MoveCodeResponseGetMessageRetType) { + *arg = &val +} + +type MoveCodeResponseGetMessageArgType = string +type MoveCodeResponseGetMessageRetType = string + // MoveCodeResponse struct for MoveCodeResponse type MoveCodeResponse struct { // code to move the zone. It is one time shown so better keep it. // REQUIRED - Code *string `json:"code"` + Code MoveCodeResponseGetCodeAttributeType `json:"code"` // when the code expires // REQUIRED - ExpiresAt *string `json:"expiresAt"` + ExpiresAt MoveCodeResponseGetExpiresAtAttributeType `json:"expiresAt"` // human readable message - Message *string `json:"message,omitempty"` + Message MoveCodeResponseGetMessageAttributeType `json:"message,omitempty"` } type _MoveCodeResponse MoveCodeResponse @@ -35,10 +98,10 @@ type _MoveCodeResponse MoveCodeResponse // 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 NewMoveCodeResponse(code *string, expiresAt *string) *MoveCodeResponse { +func NewMoveCodeResponse(code MoveCodeResponseGetCodeArgType, expiresAt MoveCodeResponseGetExpiresAtArgType) *MoveCodeResponse { this := MoveCodeResponse{} - this.Code = code - this.ExpiresAt = expiresAt + setMoveCodeResponseGetCodeAttributeType(&this.Code, code) + setMoveCodeResponseGetExpiresAtAttributeType(&this.ExpiresAt, expiresAt) return &this } @@ -51,91 +114,72 @@ func NewMoveCodeResponseWithDefaults() *MoveCodeResponse { } // GetCode returns the Code field value -func (o *MoveCodeResponse) GetCode() *string { - if o == nil || IsNil(o.Code) { - var ret *string - return ret - } - - return o.Code +func (o *MoveCodeResponse) GetCode() (ret MoveCodeResponseGetCodeRetType) { + ret, _ = o.GetCodeOk() + return ret } // GetCodeOk returns a tuple with the Code field value // and a boolean to check if the value has been set. -func (o *MoveCodeResponse) GetCodeOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Code, true +func (o *MoveCodeResponse) GetCodeOk() (ret MoveCodeResponseGetCodeRetType, ok bool) { + return getMoveCodeResponseGetCodeAttributeTypeOk(o.Code) } // SetCode sets field value -func (o *MoveCodeResponse) SetCode(v *string) { - o.Code = v +func (o *MoveCodeResponse) SetCode(v MoveCodeResponseGetCodeRetType) { + setMoveCodeResponseGetCodeAttributeType(&o.Code, v) } // GetExpiresAt returns the ExpiresAt field value -func (o *MoveCodeResponse) GetExpiresAt() *string { - if o == nil || IsNil(o.ExpiresAt) { - var ret *string - return ret - } - - return o.ExpiresAt +func (o *MoveCodeResponse) GetExpiresAt() (ret MoveCodeResponseGetExpiresAtRetType) { + ret, _ = o.GetExpiresAtOk() + return ret } // GetExpiresAtOk returns a tuple with the ExpiresAt field value // and a boolean to check if the value has been set. -func (o *MoveCodeResponse) GetExpiresAtOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.ExpiresAt, true +func (o *MoveCodeResponse) GetExpiresAtOk() (ret MoveCodeResponseGetExpiresAtRetType, ok bool) { + return getMoveCodeResponseGetExpiresAtAttributeTypeOk(o.ExpiresAt) } // SetExpiresAt sets field value -func (o *MoveCodeResponse) SetExpiresAt(v *string) { - o.ExpiresAt = v +func (o *MoveCodeResponse) SetExpiresAt(v MoveCodeResponseGetExpiresAtRetType) { + setMoveCodeResponseGetExpiresAtAttributeType(&o.ExpiresAt, v) } // GetMessage returns the Message field value if set, zero value otherwise. -func (o *MoveCodeResponse) GetMessage() *string { - if o == nil || IsNil(o.Message) { - var ret *string - return ret - } - return o.Message +func (o *MoveCodeResponse) GetMessage() (res MoveCodeResponseGetMessageRetType) { + res, _ = o.GetMessageOk() + return } // GetMessageOk returns a tuple with the Message field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *MoveCodeResponse) GetMessageOk() (*string, bool) { - if o == nil || IsNil(o.Message) { - return nil, false - } - return o.Message, true +func (o *MoveCodeResponse) GetMessageOk() (ret MoveCodeResponseGetMessageRetType, ok bool) { + return getMoveCodeResponseGetMessageAttributeTypeOk(o.Message) } // HasMessage returns a boolean if a field has been set. func (o *MoveCodeResponse) HasMessage() bool { - if o != nil && !IsNil(o.Message) { - return true - } - - return false + _, ok := o.GetMessageOk() + return ok } // SetMessage gets a reference to the given string and assigns it to the Message field. -func (o *MoveCodeResponse) SetMessage(v *string) { - o.Message = v +func (o *MoveCodeResponse) SetMessage(v MoveCodeResponseGetMessageRetType) { + setMoveCodeResponseGetMessageAttributeType(&o.Message, v) } func (o MoveCodeResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["code"] = o.Code - toSerialize["expiresAt"] = o.ExpiresAt - if !IsNil(o.Message) { - toSerialize["message"] = o.Message + if val, ok := getMoveCodeResponseGetCodeAttributeTypeOk(o.Code); ok { + toSerialize["Code"] = val + } + if val, ok := getMoveCodeResponseGetExpiresAtAttributeTypeOk(o.ExpiresAt); ok { + toSerialize["ExpiresAt"] = val + } + if val, ok := getMoveCodeResponseGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val } return toSerialize, nil } diff --git a/services/dns/model_move_zone_payload.go b/services/dns/model_move_zone_payload.go index 1e1b8a88c..ca0c1fb03 100644 --- a/services/dns/model_move_zone_payload.go +++ b/services/dns/model_move_zone_payload.go @@ -17,14 +17,56 @@ import ( // checks if the MoveZonePayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &MoveZonePayload{} +/* + types and functions for code +*/ + +// isNotNullableString +type MoveZonePayloadGetCodeAttributeType = *string + +func getMoveZonePayloadGetCodeAttributeTypeOk(arg MoveZonePayloadGetCodeAttributeType) (ret MoveZonePayloadGetCodeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setMoveZonePayloadGetCodeAttributeType(arg *MoveZonePayloadGetCodeAttributeType, val MoveZonePayloadGetCodeRetType) { + *arg = &val +} + +type MoveZonePayloadGetCodeArgType = string +type MoveZonePayloadGetCodeRetType = string + +/* + types and functions for zoneDnsName +*/ + +// isNotNullableString +type MoveZonePayloadGetZoneDnsNameAttributeType = *string + +func getMoveZonePayloadGetZoneDnsNameAttributeTypeOk(arg MoveZonePayloadGetZoneDnsNameAttributeType) (ret MoveZonePayloadGetZoneDnsNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setMoveZonePayloadGetZoneDnsNameAttributeType(arg *MoveZonePayloadGetZoneDnsNameAttributeType, val MoveZonePayloadGetZoneDnsNameRetType) { + *arg = &val +} + +type MoveZonePayloadGetZoneDnsNameArgType = string +type MoveZonePayloadGetZoneDnsNameRetType = string + // MoveZonePayload body to move zone from one project to another. type MoveZonePayload struct { // Code to move the zone. It must be valid, not expired and belong // REQUIRED - Code *string `json:"code"` + Code MoveZonePayloadGetCodeAttributeType `json:"code"` // ZoneDnsName is the dns name of the zone to move // REQUIRED - ZoneDnsName *string `json:"zoneDnsName"` + ZoneDnsName MoveZonePayloadGetZoneDnsNameAttributeType `json:"zoneDnsName"` } type _MoveZonePayload MoveZonePayload @@ -33,10 +75,10 @@ type _MoveZonePayload MoveZonePayload // 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 NewMoveZonePayload(code *string, zoneDnsName *string) *MoveZonePayload { +func NewMoveZonePayload(code MoveZonePayloadGetCodeArgType, zoneDnsName MoveZonePayloadGetZoneDnsNameArgType) *MoveZonePayload { this := MoveZonePayload{} - this.Code = code - this.ZoneDnsName = zoneDnsName + setMoveZonePayloadGetCodeAttributeType(&this.Code, code) + setMoveZonePayloadGetZoneDnsNameAttributeType(&this.ZoneDnsName, zoneDnsName) return &this } @@ -49,57 +91,47 @@ func NewMoveZonePayloadWithDefaults() *MoveZonePayload { } // GetCode returns the Code field value -func (o *MoveZonePayload) GetCode() *string { - if o == nil || IsNil(o.Code) { - var ret *string - return ret - } - - return o.Code +func (o *MoveZonePayload) GetCode() (ret MoveZonePayloadGetCodeRetType) { + ret, _ = o.GetCodeOk() + return ret } // GetCodeOk returns a tuple with the Code field value // and a boolean to check if the value has been set. -func (o *MoveZonePayload) GetCodeOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Code, true +func (o *MoveZonePayload) GetCodeOk() (ret MoveZonePayloadGetCodeRetType, ok bool) { + return getMoveZonePayloadGetCodeAttributeTypeOk(o.Code) } // SetCode sets field value -func (o *MoveZonePayload) SetCode(v *string) { - o.Code = v +func (o *MoveZonePayload) SetCode(v MoveZonePayloadGetCodeRetType) { + setMoveZonePayloadGetCodeAttributeType(&o.Code, v) } // GetZoneDnsName returns the ZoneDnsName field value -func (o *MoveZonePayload) GetZoneDnsName() *string { - if o == nil || IsNil(o.ZoneDnsName) { - var ret *string - return ret - } - - return o.ZoneDnsName +func (o *MoveZonePayload) GetZoneDnsName() (ret MoveZonePayloadGetZoneDnsNameRetType) { + ret, _ = o.GetZoneDnsNameOk() + return ret } // GetZoneDnsNameOk returns a tuple with the ZoneDnsName field value // and a boolean to check if the value has been set. -func (o *MoveZonePayload) GetZoneDnsNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.ZoneDnsName, true +func (o *MoveZonePayload) GetZoneDnsNameOk() (ret MoveZonePayloadGetZoneDnsNameRetType, ok bool) { + return getMoveZonePayloadGetZoneDnsNameAttributeTypeOk(o.ZoneDnsName) } // SetZoneDnsName sets field value -func (o *MoveZonePayload) SetZoneDnsName(v *string) { - o.ZoneDnsName = v +func (o *MoveZonePayload) SetZoneDnsName(v MoveZonePayloadGetZoneDnsNameRetType) { + setMoveZonePayloadGetZoneDnsNameAttributeType(&o.ZoneDnsName, v) } func (o MoveZonePayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["code"] = o.Code - toSerialize["zoneDnsName"] = o.ZoneDnsName + if val, ok := getMoveZonePayloadGetCodeAttributeTypeOk(o.Code); ok { + toSerialize["Code"] = val + } + if val, ok := getMoveZonePayloadGetZoneDnsNameAttributeTypeOk(o.ZoneDnsName); ok { + toSerialize["ZoneDnsName"] = val + } return toSerialize, nil } diff --git a/services/dns/model_partial_update_record_payload.go b/services/dns/model_partial_update_record_payload.go index d315057dc..69841d311 100644 --- a/services/dns/model_partial_update_record_payload.go +++ b/services/dns/model_partial_update_record_payload.go @@ -17,13 +17,53 @@ import ( // checks if the PartialUpdateRecordPayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &PartialUpdateRecordPayload{} +/* + types and functions for action +*/ + +// isEnumRef +type PartialUpdateRecordPayloadGetActionAttributeType = *string +type PartialUpdateRecordPayloadGetActionArgType = string +type PartialUpdateRecordPayloadGetActionRetType = string + +func getPartialUpdateRecordPayloadGetActionAttributeTypeOk(arg PartialUpdateRecordPayloadGetActionAttributeType) (ret PartialUpdateRecordPayloadGetActionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPartialUpdateRecordPayloadGetActionAttributeType(arg *PartialUpdateRecordPayloadGetActionAttributeType, val PartialUpdateRecordPayloadGetActionRetType) { + *arg = &val +} + +/* + types and functions for records +*/ + +// isArray +type PartialUpdateRecordPayloadGetRecordsAttributeType = *[]RecordPayload +type PartialUpdateRecordPayloadGetRecordsArgType = []RecordPayload +type PartialUpdateRecordPayloadGetRecordsRetType = []RecordPayload + +func getPartialUpdateRecordPayloadGetRecordsAttributeTypeOk(arg PartialUpdateRecordPayloadGetRecordsAttributeType) (ret PartialUpdateRecordPayloadGetRecordsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPartialUpdateRecordPayloadGetRecordsAttributeType(arg *PartialUpdateRecordPayloadGetRecordsAttributeType, val PartialUpdateRecordPayloadGetRecordsRetType) { + *arg = &val +} + // PartialUpdateRecordPayload RecordPatch for record patch in record set. type PartialUpdateRecordPayload struct { // REQUIRED - Action *string `json:"action"` + Action PartialUpdateRecordPayloadGetActionAttributeType `json:"action"` // records // REQUIRED - Records *[]RecordPayload `json:"records"` + Records PartialUpdateRecordPayloadGetRecordsAttributeType `json:"records"` } type _PartialUpdateRecordPayload PartialUpdateRecordPayload @@ -32,10 +72,10 @@ type _PartialUpdateRecordPayload PartialUpdateRecordPayload // 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 NewPartialUpdateRecordPayload(action *string, records *[]RecordPayload) *PartialUpdateRecordPayload { +func NewPartialUpdateRecordPayload(action PartialUpdateRecordPayloadGetActionArgType, records PartialUpdateRecordPayloadGetRecordsArgType) *PartialUpdateRecordPayload { this := PartialUpdateRecordPayload{} - this.Action = action - this.Records = records + setPartialUpdateRecordPayloadGetActionAttributeType(&this.Action, action) + setPartialUpdateRecordPayloadGetRecordsAttributeType(&this.Records, records) return &this } @@ -48,57 +88,47 @@ func NewPartialUpdateRecordPayloadWithDefaults() *PartialUpdateRecordPayload { } // GetAction returns the Action field value -func (o *PartialUpdateRecordPayload) GetAction() *string { - if o == nil || IsNil(o.Action) { - var ret *string - return ret - } - - return o.Action +func (o *PartialUpdateRecordPayload) GetAction() (ret PartialUpdateRecordPayloadGetActionRetType) { + ret, _ = o.GetActionOk() + return ret } // GetActionOk returns a tuple with the Action field value // and a boolean to check if the value has been set. -func (o *PartialUpdateRecordPayload) GetActionOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Action, true +func (o *PartialUpdateRecordPayload) GetActionOk() (ret PartialUpdateRecordPayloadGetActionRetType, ok bool) { + return getPartialUpdateRecordPayloadGetActionAttributeTypeOk(o.Action) } // SetAction sets field value -func (o *PartialUpdateRecordPayload) SetAction(v *string) { - o.Action = v +func (o *PartialUpdateRecordPayload) SetAction(v PartialUpdateRecordPayloadGetActionRetType) { + setPartialUpdateRecordPayloadGetActionAttributeType(&o.Action, v) } // GetRecords returns the Records field value -func (o *PartialUpdateRecordPayload) GetRecords() *[]RecordPayload { - if o == nil || IsNil(o.Records) { - var ret *[]RecordPayload - return ret - } - - return o.Records +func (o *PartialUpdateRecordPayload) GetRecords() (ret PartialUpdateRecordPayloadGetRecordsRetType) { + ret, _ = o.GetRecordsOk() + return ret } // GetRecordsOk returns a tuple with the Records field value // and a boolean to check if the value has been set. -func (o *PartialUpdateRecordPayload) GetRecordsOk() (*[]RecordPayload, bool) { - if o == nil { - return nil, false - } - return o.Records, true +func (o *PartialUpdateRecordPayload) GetRecordsOk() (ret PartialUpdateRecordPayloadGetRecordsRetType, ok bool) { + return getPartialUpdateRecordPayloadGetRecordsAttributeTypeOk(o.Records) } // SetRecords sets field value -func (o *PartialUpdateRecordPayload) SetRecords(v *[]RecordPayload) { - o.Records = v +func (o *PartialUpdateRecordPayload) SetRecords(v PartialUpdateRecordPayloadGetRecordsRetType) { + setPartialUpdateRecordPayloadGetRecordsAttributeType(&o.Records, v) } func (o PartialUpdateRecordPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["action"] = o.Action - toSerialize["records"] = o.Records + if val, ok := getPartialUpdateRecordPayloadGetActionAttributeTypeOk(o.Action); ok { + toSerialize["Action"] = val + } + if val, ok := getPartialUpdateRecordPayloadGetRecordsAttributeTypeOk(o.Records); ok { + toSerialize["Records"] = val + } return toSerialize, nil } diff --git a/services/dns/model_partial_update_record_set_payload.go b/services/dns/model_partial_update_record_set_payload.go index 685ad266a..6780e037d 100644 --- a/services/dns/model_partial_update_record_set_payload.go +++ b/services/dns/model_partial_update_record_set_payload.go @@ -17,16 +17,99 @@ import ( // checks if the PartialUpdateRecordSetPayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &PartialUpdateRecordSetPayload{} +/* + types and functions for comment +*/ + +// isNotNullableString +type PartialUpdateRecordSetPayloadGetCommentAttributeType = *string + +func getPartialUpdateRecordSetPayloadGetCommentAttributeTypeOk(arg PartialUpdateRecordSetPayloadGetCommentAttributeType) (ret PartialUpdateRecordSetPayloadGetCommentRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPartialUpdateRecordSetPayloadGetCommentAttributeType(arg *PartialUpdateRecordSetPayloadGetCommentAttributeType, val PartialUpdateRecordSetPayloadGetCommentRetType) { + *arg = &val +} + +type PartialUpdateRecordSetPayloadGetCommentArgType = string +type PartialUpdateRecordSetPayloadGetCommentRetType = string + +/* + types and functions for name +*/ + +// isNotNullableString +type PartialUpdateRecordSetPayloadGetNameAttributeType = *string + +func getPartialUpdateRecordSetPayloadGetNameAttributeTypeOk(arg PartialUpdateRecordSetPayloadGetNameAttributeType) (ret PartialUpdateRecordSetPayloadGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPartialUpdateRecordSetPayloadGetNameAttributeType(arg *PartialUpdateRecordSetPayloadGetNameAttributeType, val PartialUpdateRecordSetPayloadGetNameRetType) { + *arg = &val +} + +type PartialUpdateRecordSetPayloadGetNameArgType = string +type PartialUpdateRecordSetPayloadGetNameRetType = string + +/* + types and functions for records +*/ + +// isArray +type PartialUpdateRecordSetPayloadGetRecordsAttributeType = *[]RecordPayload +type PartialUpdateRecordSetPayloadGetRecordsArgType = []RecordPayload +type PartialUpdateRecordSetPayloadGetRecordsRetType = []RecordPayload + +func getPartialUpdateRecordSetPayloadGetRecordsAttributeTypeOk(arg PartialUpdateRecordSetPayloadGetRecordsAttributeType) (ret PartialUpdateRecordSetPayloadGetRecordsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPartialUpdateRecordSetPayloadGetRecordsAttributeType(arg *PartialUpdateRecordSetPayloadGetRecordsAttributeType, val PartialUpdateRecordSetPayloadGetRecordsRetType) { + *arg = &val +} + +/* + types and functions for ttl +*/ + +// isInteger +type PartialUpdateRecordSetPayloadGetTtlAttributeType = *int64 +type PartialUpdateRecordSetPayloadGetTtlArgType = int64 +type PartialUpdateRecordSetPayloadGetTtlRetType = int64 + +func getPartialUpdateRecordSetPayloadGetTtlAttributeTypeOk(arg PartialUpdateRecordSetPayloadGetTtlAttributeType) (ret PartialUpdateRecordSetPayloadGetTtlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPartialUpdateRecordSetPayloadGetTtlAttributeType(arg *PartialUpdateRecordSetPayloadGetTtlAttributeType, val PartialUpdateRecordSetPayloadGetTtlRetType) { + *arg = &val +} + // PartialUpdateRecordSetPayload RRSetPatch for rr patch set info. type PartialUpdateRecordSetPayload struct { // user comment - Comment *string `json:"comment,omitempty"` + Comment PartialUpdateRecordSetPayloadGetCommentAttributeType `json:"comment,omitempty"` // rfc1035 Section 2.3.4 - Name *string `json:"name,omitempty"` + Name PartialUpdateRecordSetPayloadGetNameAttributeType `json:"name,omitempty"` // records - Records *[]RecordPayload `json:"records,omitempty"` + Records PartialUpdateRecordSetPayloadGetRecordsAttributeType `json:"records,omitempty"` // time to live - Ttl *int64 `json:"ttl,omitempty"` + // Can be cast to int32 without loss of precision. + Ttl PartialUpdateRecordSetPayloadGetTtlAttributeType `json:"ttl,omitempty"` } // NewPartialUpdateRecordSetPayload instantiates a new PartialUpdateRecordSetPayload object @@ -47,146 +130,110 @@ func NewPartialUpdateRecordSetPayloadWithDefaults() *PartialUpdateRecordSetPaylo } // GetComment returns the Comment field value if set, zero value otherwise. -func (o *PartialUpdateRecordSetPayload) GetComment() *string { - if o == nil || IsNil(o.Comment) { - var ret *string - return ret - } - return o.Comment +func (o *PartialUpdateRecordSetPayload) GetComment() (res PartialUpdateRecordSetPayloadGetCommentRetType) { + res, _ = o.GetCommentOk() + return } // GetCommentOk returns a tuple with the Comment field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PartialUpdateRecordSetPayload) GetCommentOk() (*string, bool) { - if o == nil || IsNil(o.Comment) { - return nil, false - } - return o.Comment, true +func (o *PartialUpdateRecordSetPayload) GetCommentOk() (ret PartialUpdateRecordSetPayloadGetCommentRetType, ok bool) { + return getPartialUpdateRecordSetPayloadGetCommentAttributeTypeOk(o.Comment) } // HasComment returns a boolean if a field has been set. func (o *PartialUpdateRecordSetPayload) HasComment() bool { - if o != nil && !IsNil(o.Comment) { - return true - } - - return false + _, ok := o.GetCommentOk() + return ok } // SetComment gets a reference to the given string and assigns it to the Comment field. -func (o *PartialUpdateRecordSetPayload) SetComment(v *string) { - o.Comment = v +func (o *PartialUpdateRecordSetPayload) SetComment(v PartialUpdateRecordSetPayloadGetCommentRetType) { + setPartialUpdateRecordSetPayloadGetCommentAttributeType(&o.Comment, v) } // GetName returns the Name field value if set, zero value otherwise. -func (o *PartialUpdateRecordSetPayload) GetName() *string { - if o == nil || IsNil(o.Name) { - var ret *string - return ret - } - return o.Name +func (o *PartialUpdateRecordSetPayload) GetName() (res PartialUpdateRecordSetPayloadGetNameRetType) { + res, _ = o.GetNameOk() + return } // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PartialUpdateRecordSetPayload) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true +func (o *PartialUpdateRecordSetPayload) GetNameOk() (ret PartialUpdateRecordSetPayloadGetNameRetType, ok bool) { + return getPartialUpdateRecordSetPayloadGetNameAttributeTypeOk(o.Name) } // HasName returns a boolean if a field has been set. func (o *PartialUpdateRecordSetPayload) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false + _, ok := o.GetNameOk() + return ok } // SetName gets a reference to the given string and assigns it to the Name field. -func (o *PartialUpdateRecordSetPayload) SetName(v *string) { - o.Name = v +func (o *PartialUpdateRecordSetPayload) SetName(v PartialUpdateRecordSetPayloadGetNameRetType) { + setPartialUpdateRecordSetPayloadGetNameAttributeType(&o.Name, v) } // GetRecords returns the Records field value if set, zero value otherwise. -func (o *PartialUpdateRecordSetPayload) GetRecords() *[]RecordPayload { - if o == nil || IsNil(o.Records) { - var ret *[]RecordPayload - return ret - } - return o.Records +func (o *PartialUpdateRecordSetPayload) GetRecords() (res PartialUpdateRecordSetPayloadGetRecordsRetType) { + res, _ = o.GetRecordsOk() + return } // GetRecordsOk returns a tuple with the Records field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PartialUpdateRecordSetPayload) GetRecordsOk() (*[]RecordPayload, bool) { - if o == nil || IsNil(o.Records) { - return nil, false - } - return o.Records, true +func (o *PartialUpdateRecordSetPayload) GetRecordsOk() (ret PartialUpdateRecordSetPayloadGetRecordsRetType, ok bool) { + return getPartialUpdateRecordSetPayloadGetRecordsAttributeTypeOk(o.Records) } // HasRecords returns a boolean if a field has been set. func (o *PartialUpdateRecordSetPayload) HasRecords() bool { - if o != nil && !IsNil(o.Records) { - return true - } - - return false + _, ok := o.GetRecordsOk() + return ok } // SetRecords gets a reference to the given []RecordPayload and assigns it to the Records field. -func (o *PartialUpdateRecordSetPayload) SetRecords(v *[]RecordPayload) { - o.Records = v +func (o *PartialUpdateRecordSetPayload) SetRecords(v PartialUpdateRecordSetPayloadGetRecordsRetType) { + setPartialUpdateRecordSetPayloadGetRecordsAttributeType(&o.Records, v) } // GetTtl returns the Ttl field value if set, zero value otherwise. -func (o *PartialUpdateRecordSetPayload) GetTtl() *int64 { - if o == nil || IsNil(o.Ttl) { - var ret *int64 - return ret - } - return o.Ttl +func (o *PartialUpdateRecordSetPayload) GetTtl() (res PartialUpdateRecordSetPayloadGetTtlRetType) { + res, _ = o.GetTtlOk() + return } // GetTtlOk returns a tuple with the Ttl field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PartialUpdateRecordSetPayload) GetTtlOk() (*int64, bool) { - if o == nil || IsNil(o.Ttl) { - return nil, false - } - return o.Ttl, true +func (o *PartialUpdateRecordSetPayload) GetTtlOk() (ret PartialUpdateRecordSetPayloadGetTtlRetType, ok bool) { + return getPartialUpdateRecordSetPayloadGetTtlAttributeTypeOk(o.Ttl) } // HasTtl returns a boolean if a field has been set. func (o *PartialUpdateRecordSetPayload) HasTtl() bool { - if o != nil && !IsNil(o.Ttl) { - return true - } - - return false + _, ok := o.GetTtlOk() + return ok } // SetTtl gets a reference to the given int64 and assigns it to the Ttl field. -func (o *PartialUpdateRecordSetPayload) SetTtl(v *int64) { - o.Ttl = v +func (o *PartialUpdateRecordSetPayload) SetTtl(v PartialUpdateRecordSetPayloadGetTtlRetType) { + setPartialUpdateRecordSetPayloadGetTtlAttributeType(&o.Ttl, v) } func (o PartialUpdateRecordSetPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Comment) { - toSerialize["comment"] = o.Comment + if val, ok := getPartialUpdateRecordSetPayloadGetCommentAttributeTypeOk(o.Comment); ok { + toSerialize["Comment"] = val } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name + if val, ok := getPartialUpdateRecordSetPayloadGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val } - if !IsNil(o.Records) { - toSerialize["records"] = o.Records + if val, ok := getPartialUpdateRecordSetPayloadGetRecordsAttributeTypeOk(o.Records); ok { + toSerialize["Records"] = val } - if !IsNil(o.Ttl) { - toSerialize["ttl"] = o.Ttl + if val, ok := getPartialUpdateRecordSetPayloadGetTtlAttributeTypeOk(o.Ttl); ok { + toSerialize["Ttl"] = val } return toSerialize, nil } diff --git a/services/dns/model_partial_update_zone_payload.go b/services/dns/model_partial_update_zone_payload.go index 17cf476a8..bea32d386 100644 --- a/services/dns/model_partial_update_zone_payload.go +++ b/services/dns/model_partial_update_zone_payload.go @@ -17,29 +17,258 @@ import ( // checks if the PartialUpdateZonePayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &PartialUpdateZonePayload{} +/* + types and functions for acl +*/ + +// isNotNullableString +type PartialUpdateZonePayloadGetAclAttributeType = *string + +func getPartialUpdateZonePayloadGetAclAttributeTypeOk(arg PartialUpdateZonePayloadGetAclAttributeType) (ret PartialUpdateZonePayloadGetAclRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPartialUpdateZonePayloadGetAclAttributeType(arg *PartialUpdateZonePayloadGetAclAttributeType, val PartialUpdateZonePayloadGetAclRetType) { + *arg = &val +} + +type PartialUpdateZonePayloadGetAclArgType = string +type PartialUpdateZonePayloadGetAclRetType = string + +/* + types and functions for contactEmail +*/ + +// isNotNullableString +type PartialUpdateZonePayloadGetContactEmailAttributeType = *string + +func getPartialUpdateZonePayloadGetContactEmailAttributeTypeOk(arg PartialUpdateZonePayloadGetContactEmailAttributeType) (ret PartialUpdateZonePayloadGetContactEmailRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPartialUpdateZonePayloadGetContactEmailAttributeType(arg *PartialUpdateZonePayloadGetContactEmailAttributeType, val PartialUpdateZonePayloadGetContactEmailRetType) { + *arg = &val +} + +type PartialUpdateZonePayloadGetContactEmailArgType = string +type PartialUpdateZonePayloadGetContactEmailRetType = string + +/* + types and functions for defaultTTL +*/ + +// isInteger +type PartialUpdateZonePayloadGetDefaultTTLAttributeType = *int64 +type PartialUpdateZonePayloadGetDefaultTTLArgType = int64 +type PartialUpdateZonePayloadGetDefaultTTLRetType = int64 + +func getPartialUpdateZonePayloadGetDefaultTTLAttributeTypeOk(arg PartialUpdateZonePayloadGetDefaultTTLAttributeType) (ret PartialUpdateZonePayloadGetDefaultTTLRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPartialUpdateZonePayloadGetDefaultTTLAttributeType(arg *PartialUpdateZonePayloadGetDefaultTTLAttributeType, val PartialUpdateZonePayloadGetDefaultTTLRetType) { + *arg = &val +} + +/* + types and functions for description +*/ + +// isNotNullableString +type PartialUpdateZonePayloadGetDescriptionAttributeType = *string + +func getPartialUpdateZonePayloadGetDescriptionAttributeTypeOk(arg PartialUpdateZonePayloadGetDescriptionAttributeType) (ret PartialUpdateZonePayloadGetDescriptionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPartialUpdateZonePayloadGetDescriptionAttributeType(arg *PartialUpdateZonePayloadGetDescriptionAttributeType, val PartialUpdateZonePayloadGetDescriptionRetType) { + *arg = &val +} + +type PartialUpdateZonePayloadGetDescriptionArgType = string +type PartialUpdateZonePayloadGetDescriptionRetType = string + +/* + types and functions for expireTime +*/ + +// isInteger +type PartialUpdateZonePayloadGetExpireTimeAttributeType = *int64 +type PartialUpdateZonePayloadGetExpireTimeArgType = int64 +type PartialUpdateZonePayloadGetExpireTimeRetType = int64 + +func getPartialUpdateZonePayloadGetExpireTimeAttributeTypeOk(arg PartialUpdateZonePayloadGetExpireTimeAttributeType) (ret PartialUpdateZonePayloadGetExpireTimeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPartialUpdateZonePayloadGetExpireTimeAttributeType(arg *PartialUpdateZonePayloadGetExpireTimeAttributeType, val PartialUpdateZonePayloadGetExpireTimeRetType) { + *arg = &val +} + +/* + types and functions for extensions +*/ + +// isModel +type PartialUpdateZonePayloadGetExtensionsAttributeType = *CreateZonePayloadExtensions +type PartialUpdateZonePayloadGetExtensionsArgType = CreateZonePayloadExtensions +type PartialUpdateZonePayloadGetExtensionsRetType = CreateZonePayloadExtensions + +func getPartialUpdateZonePayloadGetExtensionsAttributeTypeOk(arg PartialUpdateZonePayloadGetExtensionsAttributeType) (ret PartialUpdateZonePayloadGetExtensionsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPartialUpdateZonePayloadGetExtensionsAttributeType(arg *PartialUpdateZonePayloadGetExtensionsAttributeType, val PartialUpdateZonePayloadGetExtensionsRetType) { + *arg = &val +} + +/* + types and functions for name +*/ + +// isNotNullableString +type PartialUpdateZonePayloadGetNameAttributeType = *string + +func getPartialUpdateZonePayloadGetNameAttributeTypeOk(arg PartialUpdateZonePayloadGetNameAttributeType) (ret PartialUpdateZonePayloadGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPartialUpdateZonePayloadGetNameAttributeType(arg *PartialUpdateZonePayloadGetNameAttributeType, val PartialUpdateZonePayloadGetNameRetType) { + *arg = &val +} + +type PartialUpdateZonePayloadGetNameArgType = string +type PartialUpdateZonePayloadGetNameRetType = string + +/* + types and functions for negativeCache +*/ + +// isInteger +type PartialUpdateZonePayloadGetNegativeCacheAttributeType = *int64 +type PartialUpdateZonePayloadGetNegativeCacheArgType = int64 +type PartialUpdateZonePayloadGetNegativeCacheRetType = int64 + +func getPartialUpdateZonePayloadGetNegativeCacheAttributeTypeOk(arg PartialUpdateZonePayloadGetNegativeCacheAttributeType) (ret PartialUpdateZonePayloadGetNegativeCacheRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPartialUpdateZonePayloadGetNegativeCacheAttributeType(arg *PartialUpdateZonePayloadGetNegativeCacheAttributeType, val PartialUpdateZonePayloadGetNegativeCacheRetType) { + *arg = &val +} + +/* + types and functions for primaries +*/ + +// isArray +type PartialUpdateZonePayloadGetPrimariesAttributeType = *[]string +type PartialUpdateZonePayloadGetPrimariesArgType = []string +type PartialUpdateZonePayloadGetPrimariesRetType = []string + +func getPartialUpdateZonePayloadGetPrimariesAttributeTypeOk(arg PartialUpdateZonePayloadGetPrimariesAttributeType) (ret PartialUpdateZonePayloadGetPrimariesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPartialUpdateZonePayloadGetPrimariesAttributeType(arg *PartialUpdateZonePayloadGetPrimariesAttributeType, val PartialUpdateZonePayloadGetPrimariesRetType) { + *arg = &val +} + +/* + types and functions for refreshTime +*/ + +// isInteger +type PartialUpdateZonePayloadGetRefreshTimeAttributeType = *int64 +type PartialUpdateZonePayloadGetRefreshTimeArgType = int64 +type PartialUpdateZonePayloadGetRefreshTimeRetType = int64 + +func getPartialUpdateZonePayloadGetRefreshTimeAttributeTypeOk(arg PartialUpdateZonePayloadGetRefreshTimeAttributeType) (ret PartialUpdateZonePayloadGetRefreshTimeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPartialUpdateZonePayloadGetRefreshTimeAttributeType(arg *PartialUpdateZonePayloadGetRefreshTimeAttributeType, val PartialUpdateZonePayloadGetRefreshTimeRetType) { + *arg = &val +} + +/* + types and functions for retryTime +*/ + +// isInteger +type PartialUpdateZonePayloadGetRetryTimeAttributeType = *int64 +type PartialUpdateZonePayloadGetRetryTimeArgType = int64 +type PartialUpdateZonePayloadGetRetryTimeRetType = int64 + +func getPartialUpdateZonePayloadGetRetryTimeAttributeTypeOk(arg PartialUpdateZonePayloadGetRetryTimeAttributeType) (ret PartialUpdateZonePayloadGetRetryTimeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPartialUpdateZonePayloadGetRetryTimeAttributeType(arg *PartialUpdateZonePayloadGetRetryTimeAttributeType, val PartialUpdateZonePayloadGetRetryTimeRetType) { + *arg = &val +} + // PartialUpdateZonePayload struct for PartialUpdateZonePayload type PartialUpdateZonePayload struct { // access control list - Acl *string `json:"acl,omitempty"` + Acl PartialUpdateZonePayloadGetAclAttributeType `json:"acl,omitempty"` // contact e-mail for the zone - ContactEmail *string `json:"contactEmail,omitempty"` + ContactEmail PartialUpdateZonePayloadGetContactEmailAttributeType `json:"contactEmail,omitempty"` // default time to live - DefaultTTL *int64 `json:"defaultTTL,omitempty"` + // Can be cast to int32 without loss of precision. + DefaultTTL PartialUpdateZonePayloadGetDefaultTTLAttributeType `json:"defaultTTL,omitempty"` // description of the zone - Description *string `json:"description,omitempty"` + Description PartialUpdateZonePayloadGetDescriptionAttributeType `json:"description,omitempty"` // expire time - ExpireTime *int64 `json:"expireTime,omitempty"` - Extensions *CreateZonePayloadExtensions `json:"extensions,omitempty"` + // Can be cast to int32 without loss of precision. + ExpireTime PartialUpdateZonePayloadGetExpireTimeAttributeType `json:"expireTime,omitempty"` + Extensions PartialUpdateZonePayloadGetExtensionsAttributeType `json:"extensions,omitempty"` // user given name - Name *string `json:"name,omitempty"` + Name PartialUpdateZonePayloadGetNameAttributeType `json:"name,omitempty"` // negative caching - NegativeCache *int64 `json:"negativeCache,omitempty"` + // Can be cast to int32 without loss of precision. + NegativeCache PartialUpdateZonePayloadGetNegativeCacheAttributeType `json:"negativeCache,omitempty"` // primary name server for secondary zone - Primaries *[]string `json:"primaries,omitempty"` + Primaries PartialUpdateZonePayloadGetPrimariesAttributeType `json:"primaries,omitempty"` // refresh time - RefreshTime *int64 `json:"refreshTime,omitempty"` + // Can be cast to int32 without loss of precision. + RefreshTime PartialUpdateZonePayloadGetRefreshTimeAttributeType `json:"refreshTime,omitempty"` // retry time - RetryTime *int64 `json:"retryTime,omitempty"` + // Can be cast to int32 without loss of precision. + RetryTime PartialUpdateZonePayloadGetRetryTimeAttributeType `json:"retryTime,omitempty"` } // NewPartialUpdateZonePayload instantiates a new PartialUpdateZonePayload object @@ -48,10 +277,6 @@ type PartialUpdateZonePayload struct { // will change when the set of required properties is changed func NewPartialUpdateZonePayload() *PartialUpdateZonePayload { this := PartialUpdateZonePayload{} - var acl string = "0.0.0.0/0,::/0" - this.Acl = &acl - var contactEmail string = "hostmaster@stackit.cloud" - this.ContactEmail = &contactEmail return &this } @@ -64,395 +289,304 @@ func NewPartialUpdateZonePayloadWithDefaults() *PartialUpdateZonePayload { this.Acl = &acl var contactEmail string = "hostmaster@stackit.cloud" this.ContactEmail = &contactEmail + var defaultTTL int64 = 3600 + this.DefaultTTL = &defaultTTL + var expireTime int64 = 1209600 + this.ExpireTime = &expireTime + var refreshTime int64 = 3600 + this.RefreshTime = &refreshTime + var retryTime int64 = 600 + this.RetryTime = &retryTime return &this } // GetAcl returns the Acl field value if set, zero value otherwise. -func (o *PartialUpdateZonePayload) GetAcl() *string { - if o == nil || IsNil(o.Acl) { - var ret *string - return ret - } - return o.Acl +func (o *PartialUpdateZonePayload) GetAcl() (res PartialUpdateZonePayloadGetAclRetType) { + res, _ = o.GetAclOk() + return } // GetAclOk returns a tuple with the Acl field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PartialUpdateZonePayload) GetAclOk() (*string, bool) { - if o == nil || IsNil(o.Acl) { - return nil, false - } - return o.Acl, true +func (o *PartialUpdateZonePayload) GetAclOk() (ret PartialUpdateZonePayloadGetAclRetType, ok bool) { + return getPartialUpdateZonePayloadGetAclAttributeTypeOk(o.Acl) } // HasAcl returns a boolean if a field has been set. func (o *PartialUpdateZonePayload) HasAcl() bool { - if o != nil && !IsNil(o.Acl) { - return true - } - - return false + _, ok := o.GetAclOk() + return ok } // SetAcl gets a reference to the given string and assigns it to the Acl field. -func (o *PartialUpdateZonePayload) SetAcl(v *string) { - o.Acl = v +func (o *PartialUpdateZonePayload) SetAcl(v PartialUpdateZonePayloadGetAclRetType) { + setPartialUpdateZonePayloadGetAclAttributeType(&o.Acl, v) } // GetContactEmail returns the ContactEmail field value if set, zero value otherwise. -func (o *PartialUpdateZonePayload) GetContactEmail() *string { - if o == nil || IsNil(o.ContactEmail) { - var ret *string - return ret - } - return o.ContactEmail +func (o *PartialUpdateZonePayload) GetContactEmail() (res PartialUpdateZonePayloadGetContactEmailRetType) { + res, _ = o.GetContactEmailOk() + return } // GetContactEmailOk returns a tuple with the ContactEmail field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PartialUpdateZonePayload) GetContactEmailOk() (*string, bool) { - if o == nil || IsNil(o.ContactEmail) { - return nil, false - } - return o.ContactEmail, true +func (o *PartialUpdateZonePayload) GetContactEmailOk() (ret PartialUpdateZonePayloadGetContactEmailRetType, ok bool) { + return getPartialUpdateZonePayloadGetContactEmailAttributeTypeOk(o.ContactEmail) } // HasContactEmail returns a boolean if a field has been set. func (o *PartialUpdateZonePayload) HasContactEmail() bool { - if o != nil && !IsNil(o.ContactEmail) { - return true - } - - return false + _, ok := o.GetContactEmailOk() + return ok } // SetContactEmail gets a reference to the given string and assigns it to the ContactEmail field. -func (o *PartialUpdateZonePayload) SetContactEmail(v *string) { - o.ContactEmail = v +func (o *PartialUpdateZonePayload) SetContactEmail(v PartialUpdateZonePayloadGetContactEmailRetType) { + setPartialUpdateZonePayloadGetContactEmailAttributeType(&o.ContactEmail, v) } // GetDefaultTTL returns the DefaultTTL field value if set, zero value otherwise. -func (o *PartialUpdateZonePayload) GetDefaultTTL() *int64 { - if o == nil || IsNil(o.DefaultTTL) { - var ret *int64 - return ret - } - return o.DefaultTTL +func (o *PartialUpdateZonePayload) GetDefaultTTL() (res PartialUpdateZonePayloadGetDefaultTTLRetType) { + res, _ = o.GetDefaultTTLOk() + return } // GetDefaultTTLOk returns a tuple with the DefaultTTL field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PartialUpdateZonePayload) GetDefaultTTLOk() (*int64, bool) { - if o == nil || IsNil(o.DefaultTTL) { - return nil, false - } - return o.DefaultTTL, true +func (o *PartialUpdateZonePayload) GetDefaultTTLOk() (ret PartialUpdateZonePayloadGetDefaultTTLRetType, ok bool) { + return getPartialUpdateZonePayloadGetDefaultTTLAttributeTypeOk(o.DefaultTTL) } // HasDefaultTTL returns a boolean if a field has been set. func (o *PartialUpdateZonePayload) HasDefaultTTL() bool { - if o != nil && !IsNil(o.DefaultTTL) { - return true - } - - return false + _, ok := o.GetDefaultTTLOk() + return ok } // SetDefaultTTL gets a reference to the given int64 and assigns it to the DefaultTTL field. -func (o *PartialUpdateZonePayload) SetDefaultTTL(v *int64) { - o.DefaultTTL = v +func (o *PartialUpdateZonePayload) SetDefaultTTL(v PartialUpdateZonePayloadGetDefaultTTLRetType) { + setPartialUpdateZonePayloadGetDefaultTTLAttributeType(&o.DefaultTTL, v) } // GetDescription returns the Description field value if set, zero value otherwise. -func (o *PartialUpdateZonePayload) GetDescription() *string { - if o == nil || IsNil(o.Description) { - var ret *string - return ret - } - return o.Description +func (o *PartialUpdateZonePayload) GetDescription() (res PartialUpdateZonePayloadGetDescriptionRetType) { + res, _ = o.GetDescriptionOk() + return } // 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 *PartialUpdateZonePayload) GetDescriptionOk() (*string, bool) { - if o == nil || IsNil(o.Description) { - return nil, false - } - return o.Description, true +func (o *PartialUpdateZonePayload) GetDescriptionOk() (ret PartialUpdateZonePayloadGetDescriptionRetType, ok bool) { + return getPartialUpdateZonePayloadGetDescriptionAttributeTypeOk(o.Description) } // HasDescription returns a boolean if a field has been set. func (o *PartialUpdateZonePayload) HasDescription() bool { - if o != nil && !IsNil(o.Description) { - return true - } - - return false + _, ok := o.GetDescriptionOk() + return ok } // SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *PartialUpdateZonePayload) SetDescription(v *string) { - o.Description = v +func (o *PartialUpdateZonePayload) SetDescription(v PartialUpdateZonePayloadGetDescriptionRetType) { + setPartialUpdateZonePayloadGetDescriptionAttributeType(&o.Description, v) } // GetExpireTime returns the ExpireTime field value if set, zero value otherwise. -func (o *PartialUpdateZonePayload) GetExpireTime() *int64 { - if o == nil || IsNil(o.ExpireTime) { - var ret *int64 - return ret - } - return o.ExpireTime +func (o *PartialUpdateZonePayload) GetExpireTime() (res PartialUpdateZonePayloadGetExpireTimeRetType) { + res, _ = o.GetExpireTimeOk() + return } // GetExpireTimeOk returns a tuple with the ExpireTime field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PartialUpdateZonePayload) GetExpireTimeOk() (*int64, bool) { - if o == nil || IsNil(o.ExpireTime) { - return nil, false - } - return o.ExpireTime, true +func (o *PartialUpdateZonePayload) GetExpireTimeOk() (ret PartialUpdateZonePayloadGetExpireTimeRetType, ok bool) { + return getPartialUpdateZonePayloadGetExpireTimeAttributeTypeOk(o.ExpireTime) } // HasExpireTime returns a boolean if a field has been set. func (o *PartialUpdateZonePayload) HasExpireTime() bool { - if o != nil && !IsNil(o.ExpireTime) { - return true - } - - return false + _, ok := o.GetExpireTimeOk() + return ok } // SetExpireTime gets a reference to the given int64 and assigns it to the ExpireTime field. -func (o *PartialUpdateZonePayload) SetExpireTime(v *int64) { - o.ExpireTime = v +func (o *PartialUpdateZonePayload) SetExpireTime(v PartialUpdateZonePayloadGetExpireTimeRetType) { + setPartialUpdateZonePayloadGetExpireTimeAttributeType(&o.ExpireTime, v) } // GetExtensions returns the Extensions field value if set, zero value otherwise. -func (o *PartialUpdateZonePayload) GetExtensions() *CreateZonePayloadExtensions { - if o == nil || IsNil(o.Extensions) { - var ret *CreateZonePayloadExtensions - return ret - } - return o.Extensions +func (o *PartialUpdateZonePayload) GetExtensions() (res PartialUpdateZonePayloadGetExtensionsRetType) { + res, _ = o.GetExtensionsOk() + return } // GetExtensionsOk returns a tuple with the Extensions field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PartialUpdateZonePayload) GetExtensionsOk() (*CreateZonePayloadExtensions, bool) { - if o == nil || IsNil(o.Extensions) { - return nil, false - } - return o.Extensions, true +func (o *PartialUpdateZonePayload) GetExtensionsOk() (ret PartialUpdateZonePayloadGetExtensionsRetType, ok bool) { + return getPartialUpdateZonePayloadGetExtensionsAttributeTypeOk(o.Extensions) } // HasExtensions returns a boolean if a field has been set. func (o *PartialUpdateZonePayload) HasExtensions() bool { - if o != nil && !IsNil(o.Extensions) { - return true - } - - return false + _, ok := o.GetExtensionsOk() + return ok } // SetExtensions gets a reference to the given CreateZonePayloadExtensions and assigns it to the Extensions field. -func (o *PartialUpdateZonePayload) SetExtensions(v *CreateZonePayloadExtensions) { - o.Extensions = v +func (o *PartialUpdateZonePayload) SetExtensions(v PartialUpdateZonePayloadGetExtensionsRetType) { + setPartialUpdateZonePayloadGetExtensionsAttributeType(&o.Extensions, v) } // GetName returns the Name field value if set, zero value otherwise. -func (o *PartialUpdateZonePayload) GetName() *string { - if o == nil || IsNil(o.Name) { - var ret *string - return ret - } - return o.Name +func (o *PartialUpdateZonePayload) GetName() (res PartialUpdateZonePayloadGetNameRetType) { + res, _ = o.GetNameOk() + return } // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PartialUpdateZonePayload) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true +func (o *PartialUpdateZonePayload) GetNameOk() (ret PartialUpdateZonePayloadGetNameRetType, ok bool) { + return getPartialUpdateZonePayloadGetNameAttributeTypeOk(o.Name) } // HasName returns a boolean if a field has been set. func (o *PartialUpdateZonePayload) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false + _, ok := o.GetNameOk() + return ok } // SetName gets a reference to the given string and assigns it to the Name field. -func (o *PartialUpdateZonePayload) SetName(v *string) { - o.Name = v +func (o *PartialUpdateZonePayload) SetName(v PartialUpdateZonePayloadGetNameRetType) { + setPartialUpdateZonePayloadGetNameAttributeType(&o.Name, v) } // GetNegativeCache returns the NegativeCache field value if set, zero value otherwise. -func (o *PartialUpdateZonePayload) GetNegativeCache() *int64 { - if o == nil || IsNil(o.NegativeCache) { - var ret *int64 - return ret - } - return o.NegativeCache +func (o *PartialUpdateZonePayload) GetNegativeCache() (res PartialUpdateZonePayloadGetNegativeCacheRetType) { + res, _ = o.GetNegativeCacheOk() + return } // GetNegativeCacheOk returns a tuple with the NegativeCache field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PartialUpdateZonePayload) GetNegativeCacheOk() (*int64, bool) { - if o == nil || IsNil(o.NegativeCache) { - return nil, false - } - return o.NegativeCache, true +func (o *PartialUpdateZonePayload) GetNegativeCacheOk() (ret PartialUpdateZonePayloadGetNegativeCacheRetType, ok bool) { + return getPartialUpdateZonePayloadGetNegativeCacheAttributeTypeOk(o.NegativeCache) } // HasNegativeCache returns a boolean if a field has been set. func (o *PartialUpdateZonePayload) HasNegativeCache() bool { - if o != nil && !IsNil(o.NegativeCache) { - return true - } - - return false + _, ok := o.GetNegativeCacheOk() + return ok } // SetNegativeCache gets a reference to the given int64 and assigns it to the NegativeCache field. -func (o *PartialUpdateZonePayload) SetNegativeCache(v *int64) { - o.NegativeCache = v +func (o *PartialUpdateZonePayload) SetNegativeCache(v PartialUpdateZonePayloadGetNegativeCacheRetType) { + setPartialUpdateZonePayloadGetNegativeCacheAttributeType(&o.NegativeCache, v) } // GetPrimaries returns the Primaries field value if set, zero value otherwise. -func (o *PartialUpdateZonePayload) GetPrimaries() *[]string { - if o == nil || IsNil(o.Primaries) { - var ret *[]string - return ret - } - return o.Primaries +func (o *PartialUpdateZonePayload) GetPrimaries() (res PartialUpdateZonePayloadGetPrimariesRetType) { + res, _ = o.GetPrimariesOk() + return } // GetPrimariesOk returns a tuple with the Primaries field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PartialUpdateZonePayload) GetPrimariesOk() (*[]string, bool) { - if o == nil || IsNil(o.Primaries) { - return nil, false - } - return o.Primaries, true +func (o *PartialUpdateZonePayload) GetPrimariesOk() (ret PartialUpdateZonePayloadGetPrimariesRetType, ok bool) { + return getPartialUpdateZonePayloadGetPrimariesAttributeTypeOk(o.Primaries) } // HasPrimaries returns a boolean if a field has been set. func (o *PartialUpdateZonePayload) HasPrimaries() bool { - if o != nil && !IsNil(o.Primaries) { - return true - } - - return false + _, ok := o.GetPrimariesOk() + return ok } // SetPrimaries gets a reference to the given []string and assigns it to the Primaries field. -func (o *PartialUpdateZonePayload) SetPrimaries(v *[]string) { - o.Primaries = v +func (o *PartialUpdateZonePayload) SetPrimaries(v PartialUpdateZonePayloadGetPrimariesRetType) { + setPartialUpdateZonePayloadGetPrimariesAttributeType(&o.Primaries, v) } // GetRefreshTime returns the RefreshTime field value if set, zero value otherwise. -func (o *PartialUpdateZonePayload) GetRefreshTime() *int64 { - if o == nil || IsNil(o.RefreshTime) { - var ret *int64 - return ret - } - return o.RefreshTime +func (o *PartialUpdateZonePayload) GetRefreshTime() (res PartialUpdateZonePayloadGetRefreshTimeRetType) { + res, _ = o.GetRefreshTimeOk() + return } // GetRefreshTimeOk returns a tuple with the RefreshTime field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PartialUpdateZonePayload) GetRefreshTimeOk() (*int64, bool) { - if o == nil || IsNil(o.RefreshTime) { - return nil, false - } - return o.RefreshTime, true +func (o *PartialUpdateZonePayload) GetRefreshTimeOk() (ret PartialUpdateZonePayloadGetRefreshTimeRetType, ok bool) { + return getPartialUpdateZonePayloadGetRefreshTimeAttributeTypeOk(o.RefreshTime) } // HasRefreshTime returns a boolean if a field has been set. func (o *PartialUpdateZonePayload) HasRefreshTime() bool { - if o != nil && !IsNil(o.RefreshTime) { - return true - } - - return false + _, ok := o.GetRefreshTimeOk() + return ok } // SetRefreshTime gets a reference to the given int64 and assigns it to the RefreshTime field. -func (o *PartialUpdateZonePayload) SetRefreshTime(v *int64) { - o.RefreshTime = v +func (o *PartialUpdateZonePayload) SetRefreshTime(v PartialUpdateZonePayloadGetRefreshTimeRetType) { + setPartialUpdateZonePayloadGetRefreshTimeAttributeType(&o.RefreshTime, v) } // GetRetryTime returns the RetryTime field value if set, zero value otherwise. -func (o *PartialUpdateZonePayload) GetRetryTime() *int64 { - if o == nil || IsNil(o.RetryTime) { - var ret *int64 - return ret - } - return o.RetryTime +func (o *PartialUpdateZonePayload) GetRetryTime() (res PartialUpdateZonePayloadGetRetryTimeRetType) { + res, _ = o.GetRetryTimeOk() + return } // GetRetryTimeOk returns a tuple with the RetryTime field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PartialUpdateZonePayload) GetRetryTimeOk() (*int64, bool) { - if o == nil || IsNil(o.RetryTime) { - return nil, false - } - return o.RetryTime, true +func (o *PartialUpdateZonePayload) GetRetryTimeOk() (ret PartialUpdateZonePayloadGetRetryTimeRetType, ok bool) { + return getPartialUpdateZonePayloadGetRetryTimeAttributeTypeOk(o.RetryTime) } // HasRetryTime returns a boolean if a field has been set. func (o *PartialUpdateZonePayload) HasRetryTime() bool { - if o != nil && !IsNil(o.RetryTime) { - return true - } - - return false + _, ok := o.GetRetryTimeOk() + return ok } // SetRetryTime gets a reference to the given int64 and assigns it to the RetryTime field. -func (o *PartialUpdateZonePayload) SetRetryTime(v *int64) { - o.RetryTime = v +func (o *PartialUpdateZonePayload) SetRetryTime(v PartialUpdateZonePayloadGetRetryTimeRetType) { + setPartialUpdateZonePayloadGetRetryTimeAttributeType(&o.RetryTime, v) } func (o PartialUpdateZonePayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Acl) { - toSerialize["acl"] = o.Acl + if val, ok := getPartialUpdateZonePayloadGetAclAttributeTypeOk(o.Acl); ok { + toSerialize["Acl"] = val } - if !IsNil(o.ContactEmail) { - toSerialize["contactEmail"] = o.ContactEmail + if val, ok := getPartialUpdateZonePayloadGetContactEmailAttributeTypeOk(o.ContactEmail); ok { + toSerialize["ContactEmail"] = val } - if !IsNil(o.DefaultTTL) { - toSerialize["defaultTTL"] = o.DefaultTTL + if val, ok := getPartialUpdateZonePayloadGetDefaultTTLAttributeTypeOk(o.DefaultTTL); ok { + toSerialize["DefaultTTL"] = val } - if !IsNil(o.Description) { - toSerialize["description"] = o.Description + if val, ok := getPartialUpdateZonePayloadGetDescriptionAttributeTypeOk(o.Description); ok { + toSerialize["Description"] = val } - if !IsNil(o.ExpireTime) { - toSerialize["expireTime"] = o.ExpireTime + if val, ok := getPartialUpdateZonePayloadGetExpireTimeAttributeTypeOk(o.ExpireTime); ok { + toSerialize["ExpireTime"] = val } - if !IsNil(o.Extensions) { - toSerialize["extensions"] = o.Extensions + if val, ok := getPartialUpdateZonePayloadGetExtensionsAttributeTypeOk(o.Extensions); ok { + toSerialize["Extensions"] = val } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name + if val, ok := getPartialUpdateZonePayloadGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val } - if !IsNil(o.NegativeCache) { - toSerialize["negativeCache"] = o.NegativeCache + if val, ok := getPartialUpdateZonePayloadGetNegativeCacheAttributeTypeOk(o.NegativeCache); ok { + toSerialize["NegativeCache"] = val } - if !IsNil(o.Primaries) { - toSerialize["primaries"] = o.Primaries + if val, ok := getPartialUpdateZonePayloadGetPrimariesAttributeTypeOk(o.Primaries); ok { + toSerialize["Primaries"] = val } - if !IsNil(o.RefreshTime) { - toSerialize["refreshTime"] = o.RefreshTime + if val, ok := getPartialUpdateZonePayloadGetRefreshTimeAttributeTypeOk(o.RefreshTime); ok { + toSerialize["RefreshTime"] = val } - if !IsNil(o.RetryTime) { - toSerialize["retryTime"] = o.RetryTime + if val, ok := getPartialUpdateZonePayloadGetRetryTimeAttributeTypeOk(o.RetryTime); ok { + toSerialize["RetryTime"] = val } return toSerialize, nil } diff --git a/services/dns/model_record.go b/services/dns/model_record.go index 44eb1d96a..779d3e39e 100644 --- a/services/dns/model_record.go +++ b/services/dns/model_record.go @@ -17,14 +17,56 @@ import ( // checks if the Record type satisfies the MappedNullable interface at compile time var _ MappedNullable = &Record{} +/* + types and functions for content +*/ + +// isNotNullableString +type RecordGetContentAttributeType = *string + +func getRecordGetContentAttributeTypeOk(arg RecordGetContentAttributeType) (ret RecordGetContentRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRecordGetContentAttributeType(arg *RecordGetContentAttributeType, val RecordGetContentRetType) { + *arg = &val +} + +type RecordGetContentArgType = string +type RecordGetContentRetType = string + +/* + types and functions for id +*/ + +// isNotNullableString +type RecordGetIdAttributeType = *string + +func getRecordGetIdAttributeTypeOk(arg RecordGetIdAttributeType) (ret RecordGetIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRecordGetIdAttributeType(arg *RecordGetIdAttributeType, val RecordGetIdRetType) { + *arg = &val +} + +type RecordGetIdArgType = string +type RecordGetIdRetType = string + // Record Record. type Record struct { // content of the record // REQUIRED - Content *string `json:"content"` + Content RecordGetContentAttributeType `json:"content"` // rr set id // REQUIRED - Id *string `json:"id"` + Id RecordGetIdAttributeType `json:"id"` } type _Record Record @@ -33,10 +75,10 @@ type _Record Record // 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 NewRecord(content *string, id *string) *Record { +func NewRecord(content RecordGetContentArgType, id RecordGetIdArgType) *Record { this := Record{} - this.Content = content - this.Id = id + setRecordGetContentAttributeType(&this.Content, content) + setRecordGetIdAttributeType(&this.Id, id) return &this } @@ -49,57 +91,47 @@ func NewRecordWithDefaults() *Record { } // GetContent returns the Content field value -func (o *Record) GetContent() *string { - if o == nil || IsNil(o.Content) { - var ret *string - return ret - } - - return o.Content +func (o *Record) GetContent() (ret RecordGetContentRetType) { + ret, _ = o.GetContentOk() + return ret } // GetContentOk returns a tuple with the Content field value // and a boolean to check if the value has been set. -func (o *Record) GetContentOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Content, true +func (o *Record) GetContentOk() (ret RecordGetContentRetType, ok bool) { + return getRecordGetContentAttributeTypeOk(o.Content) } // SetContent sets field value -func (o *Record) SetContent(v *string) { - o.Content = v +func (o *Record) SetContent(v RecordGetContentRetType) { + setRecordGetContentAttributeType(&o.Content, v) } // GetId returns the Id field value -func (o *Record) GetId() *string { - if o == nil || IsNil(o.Id) { - var ret *string - return ret - } - - return o.Id +func (o *Record) GetId() (ret RecordGetIdRetType) { + ret, _ = o.GetIdOk() + return ret } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. -func (o *Record) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Id, true +func (o *Record) GetIdOk() (ret RecordGetIdRetType, ok bool) { + return getRecordGetIdAttributeTypeOk(o.Id) } // SetId sets field value -func (o *Record) SetId(v *string) { - o.Id = v +func (o *Record) SetId(v RecordGetIdRetType) { + setRecordGetIdAttributeType(&o.Id, v) } func (o Record) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["content"] = o.Content - toSerialize["id"] = o.Id + if val, ok := getRecordGetContentAttributeTypeOk(o.Content); ok { + toSerialize["Content"] = val + } + if val, ok := getRecordGetIdAttributeTypeOk(o.Id); ok { + toSerialize["Id"] = val + } return toSerialize, nil } diff --git a/services/dns/model_record_data_exchange.go b/services/dns/model_record_data_exchange.go index f69ea488a..c7e18be45 100644 --- a/services/dns/model_record_data_exchange.go +++ b/services/dns/model_record_data_exchange.go @@ -17,13 +17,117 @@ import ( // checks if the RecordDataExchange type satisfies the MappedNullable interface at compile time var _ MappedNullable = &RecordDataExchange{} +/* + types and functions for comment +*/ + +// isNotNullableString +type RecordDataExchangeGetCommentAttributeType = *string + +func getRecordDataExchangeGetCommentAttributeTypeOk(arg RecordDataExchangeGetCommentAttributeType) (ret RecordDataExchangeGetCommentRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRecordDataExchangeGetCommentAttributeType(arg *RecordDataExchangeGetCommentAttributeType, val RecordDataExchangeGetCommentRetType) { + *arg = &val +} + +type RecordDataExchangeGetCommentArgType = string +type RecordDataExchangeGetCommentRetType = string + +/* + types and functions for content +*/ + +// isArray +type RecordDataExchangeGetContentAttributeType = *[]string +type RecordDataExchangeGetContentArgType = []string +type RecordDataExchangeGetContentRetType = []string + +func getRecordDataExchangeGetContentAttributeTypeOk(arg RecordDataExchangeGetContentAttributeType) (ret RecordDataExchangeGetContentRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRecordDataExchangeGetContentAttributeType(arg *RecordDataExchangeGetContentAttributeType, val RecordDataExchangeGetContentRetType) { + *arg = &val +} + +/* + types and functions for name +*/ + +// isNotNullableString +type RecordDataExchangeGetNameAttributeType = *string + +func getRecordDataExchangeGetNameAttributeTypeOk(arg RecordDataExchangeGetNameAttributeType) (ret RecordDataExchangeGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRecordDataExchangeGetNameAttributeType(arg *RecordDataExchangeGetNameAttributeType, val RecordDataExchangeGetNameRetType) { + *arg = &val +} + +type RecordDataExchangeGetNameArgType = string +type RecordDataExchangeGetNameRetType = string + +/* + types and functions for ttl +*/ + +// isInteger +type RecordDataExchangeGetTtlAttributeType = *int64 +type RecordDataExchangeGetTtlArgType = int64 +type RecordDataExchangeGetTtlRetType = int64 + +func getRecordDataExchangeGetTtlAttributeTypeOk(arg RecordDataExchangeGetTtlAttributeType) (ret RecordDataExchangeGetTtlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRecordDataExchangeGetTtlAttributeType(arg *RecordDataExchangeGetTtlAttributeType, val RecordDataExchangeGetTtlRetType) { + *arg = &val +} + +/* + types and functions for type +*/ + +// isNotNullableString +type RecordDataExchangeGetTypeAttributeType = *string + +func getRecordDataExchangeGetTypeAttributeTypeOk(arg RecordDataExchangeGetTypeAttributeType) (ret RecordDataExchangeGetTypeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRecordDataExchangeGetTypeAttributeType(arg *RecordDataExchangeGetTypeAttributeType, val RecordDataExchangeGetTypeRetType) { + *arg = &val +} + +type RecordDataExchangeGetTypeArgType = string +type RecordDataExchangeGetTypeRetType = string + // RecordDataExchange struct for RecordDataExchange type RecordDataExchange struct { - Comment *string `json:"comment,omitempty"` - Content *[]string `json:"content,omitempty"` - Name *string `json:"name,omitempty"` - Ttl *int64 `json:"ttl,omitempty"` - Type *string `json:"type,omitempty"` + Comment RecordDataExchangeGetCommentAttributeType `json:"comment,omitempty"` + Content RecordDataExchangeGetContentAttributeType `json:"content,omitempty"` + Name RecordDataExchangeGetNameAttributeType `json:"name,omitempty"` + // Can be cast to int32 without loss of precision. + Ttl RecordDataExchangeGetTtlAttributeType `json:"ttl,omitempty"` + Type RecordDataExchangeGetTypeAttributeType `json:"type,omitempty"` } // NewRecordDataExchange instantiates a new RecordDataExchange object @@ -44,181 +148,136 @@ func NewRecordDataExchangeWithDefaults() *RecordDataExchange { } // GetComment returns the Comment field value if set, zero value otherwise. -func (o *RecordDataExchange) GetComment() *string { - if o == nil || IsNil(o.Comment) { - var ret *string - return ret - } - return o.Comment +func (o *RecordDataExchange) GetComment() (res RecordDataExchangeGetCommentRetType) { + res, _ = o.GetCommentOk() + return } // GetCommentOk returns a tuple with the Comment field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *RecordDataExchange) GetCommentOk() (*string, bool) { - if o == nil || IsNil(o.Comment) { - return nil, false - } - return o.Comment, true +func (o *RecordDataExchange) GetCommentOk() (ret RecordDataExchangeGetCommentRetType, ok bool) { + return getRecordDataExchangeGetCommentAttributeTypeOk(o.Comment) } // HasComment returns a boolean if a field has been set. func (o *RecordDataExchange) HasComment() bool { - if o != nil && !IsNil(o.Comment) { - return true - } - - return false + _, ok := o.GetCommentOk() + return ok } // SetComment gets a reference to the given string and assigns it to the Comment field. -func (o *RecordDataExchange) SetComment(v *string) { - o.Comment = v +func (o *RecordDataExchange) SetComment(v RecordDataExchangeGetCommentRetType) { + setRecordDataExchangeGetCommentAttributeType(&o.Comment, v) } // GetContent returns the Content field value if set, zero value otherwise. -func (o *RecordDataExchange) GetContent() *[]string { - if o == nil || IsNil(o.Content) { - var ret *[]string - return ret - } - return o.Content +func (o *RecordDataExchange) GetContent() (res RecordDataExchangeGetContentRetType) { + res, _ = o.GetContentOk() + return } // GetContentOk returns a tuple with the Content field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *RecordDataExchange) GetContentOk() (*[]string, bool) { - if o == nil || IsNil(o.Content) { - return nil, false - } - return o.Content, true +func (o *RecordDataExchange) GetContentOk() (ret RecordDataExchangeGetContentRetType, ok bool) { + return getRecordDataExchangeGetContentAttributeTypeOk(o.Content) } // HasContent returns a boolean if a field has been set. func (o *RecordDataExchange) HasContent() bool { - if o != nil && !IsNil(o.Content) { - return true - } - - return false + _, ok := o.GetContentOk() + return ok } // SetContent gets a reference to the given []string and assigns it to the Content field. -func (o *RecordDataExchange) SetContent(v *[]string) { - o.Content = v +func (o *RecordDataExchange) SetContent(v RecordDataExchangeGetContentRetType) { + setRecordDataExchangeGetContentAttributeType(&o.Content, v) } // GetName returns the Name field value if set, zero value otherwise. -func (o *RecordDataExchange) GetName() *string { - if o == nil || IsNil(o.Name) { - var ret *string - return ret - } - return o.Name +func (o *RecordDataExchange) GetName() (res RecordDataExchangeGetNameRetType) { + res, _ = o.GetNameOk() + return } // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *RecordDataExchange) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true +func (o *RecordDataExchange) GetNameOk() (ret RecordDataExchangeGetNameRetType, ok bool) { + return getRecordDataExchangeGetNameAttributeTypeOk(o.Name) } // HasName returns a boolean if a field has been set. func (o *RecordDataExchange) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false + _, ok := o.GetNameOk() + return ok } // SetName gets a reference to the given string and assigns it to the Name field. -func (o *RecordDataExchange) SetName(v *string) { - o.Name = v +func (o *RecordDataExchange) SetName(v RecordDataExchangeGetNameRetType) { + setRecordDataExchangeGetNameAttributeType(&o.Name, v) } // GetTtl returns the Ttl field value if set, zero value otherwise. -func (o *RecordDataExchange) GetTtl() *int64 { - if o == nil || IsNil(o.Ttl) { - var ret *int64 - return ret - } - return o.Ttl +func (o *RecordDataExchange) GetTtl() (res RecordDataExchangeGetTtlRetType) { + res, _ = o.GetTtlOk() + return } // GetTtlOk returns a tuple with the Ttl field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *RecordDataExchange) GetTtlOk() (*int64, bool) { - if o == nil || IsNil(o.Ttl) { - return nil, false - } - return o.Ttl, true +func (o *RecordDataExchange) GetTtlOk() (ret RecordDataExchangeGetTtlRetType, ok bool) { + return getRecordDataExchangeGetTtlAttributeTypeOk(o.Ttl) } // HasTtl returns a boolean if a field has been set. func (o *RecordDataExchange) HasTtl() bool { - if o != nil && !IsNil(o.Ttl) { - return true - } - - return false + _, ok := o.GetTtlOk() + return ok } // SetTtl gets a reference to the given int64 and assigns it to the Ttl field. -func (o *RecordDataExchange) SetTtl(v *int64) { - o.Ttl = v +func (o *RecordDataExchange) SetTtl(v RecordDataExchangeGetTtlRetType) { + setRecordDataExchangeGetTtlAttributeType(&o.Ttl, v) } // GetType returns the Type field value if set, zero value otherwise. -func (o *RecordDataExchange) GetType() *string { - if o == nil || IsNil(o.Type) { - var ret *string - return ret - } - return o.Type +func (o *RecordDataExchange) GetType() (res RecordDataExchangeGetTypeRetType) { + res, _ = o.GetTypeOk() + return } // GetTypeOk returns a tuple with the Type field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *RecordDataExchange) GetTypeOk() (*string, bool) { - if o == nil || IsNil(o.Type) { - return nil, false - } - return o.Type, true +func (o *RecordDataExchange) GetTypeOk() (ret RecordDataExchangeGetTypeRetType, ok bool) { + return getRecordDataExchangeGetTypeAttributeTypeOk(o.Type) } // HasType returns a boolean if a field has been set. func (o *RecordDataExchange) HasType() bool { - if o != nil && !IsNil(o.Type) { - return true - } - - return false + _, ok := o.GetTypeOk() + return ok } // SetType gets a reference to the given string and assigns it to the Type field. -func (o *RecordDataExchange) SetType(v *string) { - o.Type = v +func (o *RecordDataExchange) SetType(v RecordDataExchangeGetTypeRetType) { + setRecordDataExchangeGetTypeAttributeType(&o.Type, v) } func (o RecordDataExchange) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Comment) { - toSerialize["comment"] = o.Comment + if val, ok := getRecordDataExchangeGetCommentAttributeTypeOk(o.Comment); ok { + toSerialize["Comment"] = val } - if !IsNil(o.Content) { - toSerialize["content"] = o.Content + if val, ok := getRecordDataExchangeGetContentAttributeTypeOk(o.Content); ok { + toSerialize["Content"] = val } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name + if val, ok := getRecordDataExchangeGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val } - if !IsNil(o.Ttl) { - toSerialize["ttl"] = o.Ttl + if val, ok := getRecordDataExchangeGetTtlAttributeTypeOk(o.Ttl); ok { + toSerialize["Ttl"] = val } - if !IsNil(o.Type) { - toSerialize["type"] = o.Type + if val, ok := getRecordDataExchangeGetTypeAttributeTypeOk(o.Type); ok { + toSerialize["Type"] = val } return toSerialize, nil } diff --git a/services/dns/model_record_payload.go b/services/dns/model_record_payload.go index cf387bab4..accefa137 100644 --- a/services/dns/model_record_payload.go +++ b/services/dns/model_record_payload.go @@ -17,11 +17,32 @@ import ( // checks if the RecordPayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &RecordPayload{} +/* + types and functions for content +*/ + +// isNotNullableString +type RecordPayloadGetContentAttributeType = *string + +func getRecordPayloadGetContentAttributeTypeOk(arg RecordPayloadGetContentAttributeType) (ret RecordPayloadGetContentRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRecordPayloadGetContentAttributeType(arg *RecordPayloadGetContentAttributeType, val RecordPayloadGetContentRetType) { + *arg = &val +} + +type RecordPayloadGetContentArgType = string +type RecordPayloadGetContentRetType = string + // RecordPayload RecordPost for rr set info. type RecordPayload struct { // content of the record // REQUIRED - Content *string `json:"content"` + Content RecordPayloadGetContentAttributeType `json:"content"` } type _RecordPayload RecordPayload @@ -30,9 +51,9 @@ type _RecordPayload RecordPayload // 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 NewRecordPayload(content *string) *RecordPayload { +func NewRecordPayload(content RecordPayloadGetContentArgType) *RecordPayload { this := RecordPayload{} - this.Content = content + setRecordPayloadGetContentAttributeType(&this.Content, content) return &this } @@ -45,32 +66,27 @@ func NewRecordPayloadWithDefaults() *RecordPayload { } // GetContent returns the Content field value -func (o *RecordPayload) GetContent() *string { - if o == nil || IsNil(o.Content) { - var ret *string - return ret - } - - return o.Content +func (o *RecordPayload) GetContent() (ret RecordPayloadGetContentRetType) { + ret, _ = o.GetContentOk() + return ret } // GetContentOk returns a tuple with the Content field value // and a boolean to check if the value has been set. -func (o *RecordPayload) GetContentOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Content, true +func (o *RecordPayload) GetContentOk() (ret RecordPayloadGetContentRetType, ok bool) { + return getRecordPayloadGetContentAttributeTypeOk(o.Content) } // SetContent sets field value -func (o *RecordPayload) SetContent(v *string) { - o.Content = v +func (o *RecordPayload) SetContent(v RecordPayloadGetContentRetType) { + setRecordPayloadGetContentAttributeType(&o.Content, v) } func (o RecordPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["content"] = o.Content + if val, ok := getRecordPayloadGetContentAttributeTypeOk(o.Content); ok { + toSerialize["Content"] = val + } return toSerialize, nil } diff --git a/services/dns/model_record_set.go b/services/dns/model_record_set.go index 35817eb95..356698a72 100644 --- a/services/dns/model_record_set.go +++ b/services/dns/model_record_set.go @@ -17,44 +17,313 @@ import ( // checks if the RecordSet type satisfies the MappedNullable interface at compile time var _ MappedNullable = &RecordSet{} +/* + types and functions for active +*/ + +// isBoolean +type RecordSetgetActiveAttributeType = *bool +type RecordSetgetActiveArgType = bool +type RecordSetgetActiveRetType = bool + +func getRecordSetgetActiveAttributeTypeOk(arg RecordSetgetActiveAttributeType) (ret RecordSetgetActiveRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRecordSetgetActiveAttributeType(arg *RecordSetgetActiveAttributeType, val RecordSetgetActiveRetType) { + *arg = &val +} + +/* + types and functions for comment +*/ + +// isNotNullableString +type RecordSetGetCommentAttributeType = *string + +func getRecordSetGetCommentAttributeTypeOk(arg RecordSetGetCommentAttributeType) (ret RecordSetGetCommentRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRecordSetGetCommentAttributeType(arg *RecordSetGetCommentAttributeType, val RecordSetGetCommentRetType) { + *arg = &val +} + +type RecordSetGetCommentArgType = string +type RecordSetGetCommentRetType = string + +/* + types and functions for creationFinished +*/ + +// isNotNullableString +type RecordSetGetCreationFinishedAttributeType = *string + +func getRecordSetGetCreationFinishedAttributeTypeOk(arg RecordSetGetCreationFinishedAttributeType) (ret RecordSetGetCreationFinishedRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRecordSetGetCreationFinishedAttributeType(arg *RecordSetGetCreationFinishedAttributeType, val RecordSetGetCreationFinishedRetType) { + *arg = &val +} + +type RecordSetGetCreationFinishedArgType = string +type RecordSetGetCreationFinishedRetType = string + +/* + types and functions for creationStarted +*/ + +// isNotNullableString +type RecordSetGetCreationStartedAttributeType = *string + +func getRecordSetGetCreationStartedAttributeTypeOk(arg RecordSetGetCreationStartedAttributeType) (ret RecordSetGetCreationStartedRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRecordSetGetCreationStartedAttributeType(arg *RecordSetGetCreationStartedAttributeType, val RecordSetGetCreationStartedRetType) { + *arg = &val +} + +type RecordSetGetCreationStartedArgType = string +type RecordSetGetCreationStartedRetType = string + +/* + types and functions for error +*/ + +// isNotNullableString +type RecordSetGetErrorAttributeType = *string + +func getRecordSetGetErrorAttributeTypeOk(arg RecordSetGetErrorAttributeType) (ret RecordSetGetErrorRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRecordSetGetErrorAttributeType(arg *RecordSetGetErrorAttributeType, val RecordSetGetErrorRetType) { + *arg = &val +} + +type RecordSetGetErrorArgType = string +type RecordSetGetErrorRetType = string + +/* + types and functions for id +*/ + +// isNotNullableString +type RecordSetGetIdAttributeType = *string + +func getRecordSetGetIdAttributeTypeOk(arg RecordSetGetIdAttributeType) (ret RecordSetGetIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRecordSetGetIdAttributeType(arg *RecordSetGetIdAttributeType, val RecordSetGetIdRetType) { + *arg = &val +} + +type RecordSetGetIdArgType = string +type RecordSetGetIdRetType = string + +/* + types and functions for name +*/ + +// isNotNullableString +type RecordSetGetNameAttributeType = *string + +func getRecordSetGetNameAttributeTypeOk(arg RecordSetGetNameAttributeType) (ret RecordSetGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRecordSetGetNameAttributeType(arg *RecordSetGetNameAttributeType, val RecordSetGetNameRetType) { + *arg = &val +} + +type RecordSetGetNameArgType = string +type RecordSetGetNameRetType = string + +/* + types and functions for records +*/ + +// isArray +type RecordSetGetRecordsAttributeType = *[]Record +type RecordSetGetRecordsArgType = []Record +type RecordSetGetRecordsRetType = []Record + +func getRecordSetGetRecordsAttributeTypeOk(arg RecordSetGetRecordsAttributeType) (ret RecordSetGetRecordsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRecordSetGetRecordsAttributeType(arg *RecordSetGetRecordsAttributeType, val RecordSetGetRecordsRetType) { + *arg = &val +} + +/* + types and functions for state +*/ + +// isEnumRef +type RecordSetGetStateAttributeType = *string +type RecordSetGetStateArgType = string +type RecordSetGetStateRetType = string + +func getRecordSetGetStateAttributeTypeOk(arg RecordSetGetStateAttributeType) (ret RecordSetGetStateRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRecordSetGetStateAttributeType(arg *RecordSetGetStateAttributeType, val RecordSetGetStateRetType) { + *arg = &val +} + +/* + types and functions for ttl +*/ + +// isInteger +type RecordSetGetTtlAttributeType = *int64 +type RecordSetGetTtlArgType = int64 +type RecordSetGetTtlRetType = int64 + +func getRecordSetGetTtlAttributeTypeOk(arg RecordSetGetTtlAttributeType) (ret RecordSetGetTtlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRecordSetGetTtlAttributeType(arg *RecordSetGetTtlAttributeType, val RecordSetGetTtlRetType) { + *arg = &val +} + +/* + types and functions for type +*/ + +// isEnumRef +type RecordSetGetTypeAttributeType = *string +type RecordSetGetTypeArgType = string +type RecordSetGetTypeRetType = string + +func getRecordSetGetTypeAttributeTypeOk(arg RecordSetGetTypeAttributeType) (ret RecordSetGetTypeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRecordSetGetTypeAttributeType(arg *RecordSetGetTypeAttributeType, val RecordSetGetTypeRetType) { + *arg = &val +} + +/* + types and functions for updateFinished +*/ + +// isNotNullableString +type RecordSetGetUpdateFinishedAttributeType = *string + +func getRecordSetGetUpdateFinishedAttributeTypeOk(arg RecordSetGetUpdateFinishedAttributeType) (ret RecordSetGetUpdateFinishedRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRecordSetGetUpdateFinishedAttributeType(arg *RecordSetGetUpdateFinishedAttributeType, val RecordSetGetUpdateFinishedRetType) { + *arg = &val +} + +type RecordSetGetUpdateFinishedArgType = string +type RecordSetGetUpdateFinishedRetType = string + +/* + types and functions for updateStarted +*/ + +// isNotNullableString +type RecordSetGetUpdateStartedAttributeType = *string + +func getRecordSetGetUpdateStartedAttributeTypeOk(arg RecordSetGetUpdateStartedAttributeType) (ret RecordSetGetUpdateStartedRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRecordSetGetUpdateStartedAttributeType(arg *RecordSetGetUpdateStartedAttributeType, val RecordSetGetUpdateStartedRetType) { + *arg = &val +} + +type RecordSetGetUpdateStartedArgType = string +type RecordSetGetUpdateStartedRetType = string + // RecordSet RRSet. type RecordSet struct { // if the record set is active or not - Active *bool `json:"active,omitempty"` + Active RecordSetgetActiveAttributeType `json:"active,omitempty"` // comment - Comment *string `json:"comment,omitempty"` + Comment RecordSetGetCommentAttributeType `json:"comment,omitempty"` // when record set creation finished // REQUIRED - CreationFinished *string `json:"creationFinished"` + CreationFinished RecordSetGetCreationFinishedAttributeType `json:"creationFinished"` // when record set creation started // REQUIRED - CreationStarted *string `json:"creationStarted"` + CreationStarted RecordSetGetCreationStartedAttributeType `json:"creationStarted"` // Error shows error in case create/update/delete failed - Error *string `json:"error,omitempty"` + Error RecordSetGetErrorAttributeType `json:"error,omitempty"` // rr set id // REQUIRED - Id *string `json:"id"` + Id RecordSetGetIdAttributeType `json:"id"` // name of the record which should be a valid domain according to rfc1035 Section 2.3.4 // REQUIRED - Name *string `json:"name"` + Name RecordSetGetNameAttributeType `json:"name"` // records // REQUIRED - Records *[]Record `json:"records"` + Records RecordSetGetRecordsAttributeType `json:"records"` // record set state // REQUIRED - State *string `json:"state"` + State RecordSetGetStateAttributeType `json:"state"` // time to live + // Can be cast to int32 without loss of precision. // REQUIRED - Ttl *int64 `json:"ttl"` + Ttl RecordSetGetTtlAttributeType `json:"ttl"` // record set type // REQUIRED - Type *string `json:"type"` + Type RecordSetGetTypeAttributeType `json:"type"` // when record set update/deletion finished // REQUIRED - UpdateFinished *string `json:"updateFinished"` + UpdateFinished RecordSetGetUpdateFinishedAttributeType `json:"updateFinished"` // when record set update/deletion started // REQUIRED - UpdateStarted *string `json:"updateStarted"` + UpdateStarted RecordSetGetUpdateStartedAttributeType `json:"updateStarted"` } type _RecordSet RecordSet @@ -63,18 +332,18 @@ type _RecordSet RecordSet // 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 NewRecordSet(creationFinished *string, creationStarted *string, id *string, name *string, records *[]Record, state *string, ttl *int64, type_ *string, updateFinished *string, updateStarted *string) *RecordSet { +func NewRecordSet(creationFinished RecordSetGetCreationFinishedArgType, creationStarted RecordSetGetCreationStartedArgType, id RecordSetGetIdArgType, name RecordSetGetNameArgType, records RecordSetGetRecordsArgType, state RecordSetGetStateArgType, ttl RecordSetGetTtlArgType, type_ RecordSetGetTypeArgType, updateFinished RecordSetGetUpdateFinishedArgType, updateStarted RecordSetGetUpdateStartedArgType) *RecordSet { this := RecordSet{} - this.CreationFinished = creationFinished - this.CreationStarted = creationStarted - this.Id = id - this.Name = name - this.Records = records - this.State = state - this.Ttl = ttl - this.Type = type_ - this.UpdateFinished = updateFinished - this.UpdateStarted = updateStarted + setRecordSetGetCreationFinishedAttributeType(&this.CreationFinished, creationFinished) + setRecordSetGetCreationStartedAttributeType(&this.CreationStarted, creationStarted) + setRecordSetGetIdAttributeType(&this.Id, id) + setRecordSetGetNameAttributeType(&this.Name, name) + setRecordSetGetRecordsAttributeType(&this.Records, records) + setRecordSetGetStateAttributeType(&this.State, state) + setRecordSetGetTtlAttributeType(&this.Ttl, ttl) + setRecordSetGetTypeAttributeType(&this.Type, type_) + setRecordSetGetUpdateFinishedAttributeType(&this.UpdateFinished, updateFinished) + setRecordSetGetUpdateStartedAttributeType(&this.UpdateStarted, updateStarted) return &this } @@ -87,362 +356,285 @@ func NewRecordSetWithDefaults() *RecordSet { } // GetActive returns the Active field value if set, zero value otherwise. -func (o *RecordSet) GetActive() *bool { - if o == nil || IsNil(o.Active) { - var ret *bool - return ret - } - return o.Active +func (o *RecordSet) GetActive() (res RecordSetgetActiveRetType) { + res, _ = o.GetActiveOk() + return } // GetActiveOk returns a tuple with the Active field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *RecordSet) GetActiveOk() (*bool, bool) { - if o == nil || IsNil(o.Active) { - return nil, false - } - return o.Active, true +func (o *RecordSet) GetActiveOk() (ret RecordSetgetActiveRetType, ok bool) { + return getRecordSetgetActiveAttributeTypeOk(o.Active) } // HasActive returns a boolean if a field has been set. func (o *RecordSet) HasActive() bool { - if o != nil && !IsNil(o.Active) { - return true - } - - return false + _, ok := o.GetActiveOk() + return ok } // SetActive gets a reference to the given bool and assigns it to the Active field. -func (o *RecordSet) SetActive(v *bool) { - o.Active = v +func (o *RecordSet) SetActive(v RecordSetgetActiveRetType) { + setRecordSetgetActiveAttributeType(&o.Active, v) } // GetComment returns the Comment field value if set, zero value otherwise. -func (o *RecordSet) GetComment() *string { - if o == nil || IsNil(o.Comment) { - var ret *string - return ret - } - return o.Comment +func (o *RecordSet) GetComment() (res RecordSetGetCommentRetType) { + res, _ = o.GetCommentOk() + return } // GetCommentOk returns a tuple with the Comment field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *RecordSet) GetCommentOk() (*string, bool) { - if o == nil || IsNil(o.Comment) { - return nil, false - } - return o.Comment, true +func (o *RecordSet) GetCommentOk() (ret RecordSetGetCommentRetType, ok bool) { + return getRecordSetGetCommentAttributeTypeOk(o.Comment) } // HasComment returns a boolean if a field has been set. func (o *RecordSet) HasComment() bool { - if o != nil && !IsNil(o.Comment) { - return true - } - - return false + _, ok := o.GetCommentOk() + return ok } // SetComment gets a reference to the given string and assigns it to the Comment field. -func (o *RecordSet) SetComment(v *string) { - o.Comment = v +func (o *RecordSet) SetComment(v RecordSetGetCommentRetType) { + setRecordSetGetCommentAttributeType(&o.Comment, v) } // GetCreationFinished returns the CreationFinished field value -func (o *RecordSet) GetCreationFinished() *string { - if o == nil || IsNil(o.CreationFinished) { - var ret *string - return ret - } - - return o.CreationFinished +func (o *RecordSet) GetCreationFinished() (ret RecordSetGetCreationFinishedRetType) { + ret, _ = o.GetCreationFinishedOk() + return ret } // GetCreationFinishedOk returns a tuple with the CreationFinished field value // and a boolean to check if the value has been set. -func (o *RecordSet) GetCreationFinishedOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.CreationFinished, true +func (o *RecordSet) GetCreationFinishedOk() (ret RecordSetGetCreationFinishedRetType, ok bool) { + return getRecordSetGetCreationFinishedAttributeTypeOk(o.CreationFinished) } // SetCreationFinished sets field value -func (o *RecordSet) SetCreationFinished(v *string) { - o.CreationFinished = v +func (o *RecordSet) SetCreationFinished(v RecordSetGetCreationFinishedRetType) { + setRecordSetGetCreationFinishedAttributeType(&o.CreationFinished, v) } // GetCreationStarted returns the CreationStarted field value -func (o *RecordSet) GetCreationStarted() *string { - if o == nil || IsNil(o.CreationStarted) { - var ret *string - return ret - } - - return o.CreationStarted +func (o *RecordSet) GetCreationStarted() (ret RecordSetGetCreationStartedRetType) { + ret, _ = o.GetCreationStartedOk() + return ret } // GetCreationStartedOk returns a tuple with the CreationStarted field value // and a boolean to check if the value has been set. -func (o *RecordSet) GetCreationStartedOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.CreationStarted, true +func (o *RecordSet) GetCreationStartedOk() (ret RecordSetGetCreationStartedRetType, ok bool) { + return getRecordSetGetCreationStartedAttributeTypeOk(o.CreationStarted) } // SetCreationStarted sets field value -func (o *RecordSet) SetCreationStarted(v *string) { - o.CreationStarted = v +func (o *RecordSet) SetCreationStarted(v RecordSetGetCreationStartedRetType) { + setRecordSetGetCreationStartedAttributeType(&o.CreationStarted, v) } // GetError returns the Error field value if set, zero value otherwise. -func (o *RecordSet) GetError() *string { - if o == nil || IsNil(o.Error) { - var ret *string - return ret - } - return o.Error +func (o *RecordSet) GetError() (res RecordSetGetErrorRetType) { + res, _ = o.GetErrorOk() + return } // GetErrorOk returns a tuple with the Error field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *RecordSet) GetErrorOk() (*string, bool) { - if o == nil || IsNil(o.Error) { - return nil, false - } - return o.Error, true +func (o *RecordSet) GetErrorOk() (ret RecordSetGetErrorRetType, ok bool) { + return getRecordSetGetErrorAttributeTypeOk(o.Error) } // HasError returns a boolean if a field has been set. func (o *RecordSet) HasError() bool { - if o != nil && !IsNil(o.Error) { - return true - } - - return false + _, ok := o.GetErrorOk() + return ok } // SetError gets a reference to the given string and assigns it to the Error field. -func (o *RecordSet) SetError(v *string) { - o.Error = v +func (o *RecordSet) SetError(v RecordSetGetErrorRetType) { + setRecordSetGetErrorAttributeType(&o.Error, v) } // GetId returns the Id field value -func (o *RecordSet) GetId() *string { - if o == nil || IsNil(o.Id) { - var ret *string - return ret - } - - return o.Id +func (o *RecordSet) GetId() (ret RecordSetGetIdRetType) { + ret, _ = o.GetIdOk() + return ret } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. -func (o *RecordSet) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Id, true +func (o *RecordSet) GetIdOk() (ret RecordSetGetIdRetType, ok bool) { + return getRecordSetGetIdAttributeTypeOk(o.Id) } // SetId sets field value -func (o *RecordSet) SetId(v *string) { - o.Id = v +func (o *RecordSet) SetId(v RecordSetGetIdRetType) { + setRecordSetGetIdAttributeType(&o.Id, v) } // GetName returns the Name field value -func (o *RecordSet) GetName() *string { - if o == nil || IsNil(o.Name) { - var ret *string - return ret - } - - return o.Name +func (o *RecordSet) GetName() (ret RecordSetGetNameRetType) { + ret, _ = o.GetNameOk() + return ret } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. -func (o *RecordSet) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Name, true +func (o *RecordSet) GetNameOk() (ret RecordSetGetNameRetType, ok bool) { + return getRecordSetGetNameAttributeTypeOk(o.Name) } // SetName sets field value -func (o *RecordSet) SetName(v *string) { - o.Name = v +func (o *RecordSet) SetName(v RecordSetGetNameRetType) { + setRecordSetGetNameAttributeType(&o.Name, v) } // GetRecords returns the Records field value -func (o *RecordSet) GetRecords() *[]Record { - if o == nil || IsNil(o.Records) { - var ret *[]Record - return ret - } - - return o.Records +func (o *RecordSet) GetRecords() (ret RecordSetGetRecordsRetType) { + ret, _ = o.GetRecordsOk() + return ret } // GetRecordsOk returns a tuple with the Records field value // and a boolean to check if the value has been set. -func (o *RecordSet) GetRecordsOk() (*[]Record, bool) { - if o == nil { - return nil, false - } - return o.Records, true +func (o *RecordSet) GetRecordsOk() (ret RecordSetGetRecordsRetType, ok bool) { + return getRecordSetGetRecordsAttributeTypeOk(o.Records) } // SetRecords sets field value -func (o *RecordSet) SetRecords(v *[]Record) { - o.Records = v +func (o *RecordSet) SetRecords(v RecordSetGetRecordsRetType) { + setRecordSetGetRecordsAttributeType(&o.Records, v) } // GetState returns the State field value -func (o *RecordSet) GetState() *string { - if o == nil || IsNil(o.State) { - var ret *string - return ret - } - - return o.State +func (o *RecordSet) GetState() (ret RecordSetGetStateRetType) { + ret, _ = o.GetStateOk() + return ret } // GetStateOk returns a tuple with the State field value // and a boolean to check if the value has been set. -func (o *RecordSet) GetStateOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.State, true +func (o *RecordSet) GetStateOk() (ret RecordSetGetStateRetType, ok bool) { + return getRecordSetGetStateAttributeTypeOk(o.State) } // SetState sets field value -func (o *RecordSet) SetState(v *string) { - o.State = v +func (o *RecordSet) SetState(v RecordSetGetStateRetType) { + setRecordSetGetStateAttributeType(&o.State, v) } // GetTtl returns the Ttl field value -func (o *RecordSet) GetTtl() *int64 { - if o == nil || IsNil(o.Ttl) { - var ret *int64 - return ret - } - - return o.Ttl +func (o *RecordSet) GetTtl() (ret RecordSetGetTtlRetType) { + ret, _ = o.GetTtlOk() + return ret } // GetTtlOk returns a tuple with the Ttl field value // and a boolean to check if the value has been set. -func (o *RecordSet) GetTtlOk() (*int64, bool) { - if o == nil { - return nil, false - } - return o.Ttl, true +func (o *RecordSet) GetTtlOk() (ret RecordSetGetTtlRetType, ok bool) { + return getRecordSetGetTtlAttributeTypeOk(o.Ttl) } // SetTtl sets field value -func (o *RecordSet) SetTtl(v *int64) { - o.Ttl = v +func (o *RecordSet) SetTtl(v RecordSetGetTtlRetType) { + setRecordSetGetTtlAttributeType(&o.Ttl, v) } // GetType returns the Type field value -func (o *RecordSet) GetType() *string { - if o == nil || IsNil(o.Type) { - var ret *string - return ret - } - - return o.Type +func (o *RecordSet) GetType() (ret RecordSetGetTypeRetType) { + ret, _ = o.GetTypeOk() + return ret } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. -func (o *RecordSet) GetTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Type, true +func (o *RecordSet) GetTypeOk() (ret RecordSetGetTypeRetType, ok bool) { + return getRecordSetGetTypeAttributeTypeOk(o.Type) } // SetType sets field value -func (o *RecordSet) SetType(v *string) { - o.Type = v +func (o *RecordSet) SetType(v RecordSetGetTypeRetType) { + setRecordSetGetTypeAttributeType(&o.Type, v) } // GetUpdateFinished returns the UpdateFinished field value -func (o *RecordSet) GetUpdateFinished() *string { - if o == nil || IsNil(o.UpdateFinished) { - var ret *string - return ret - } - - return o.UpdateFinished +func (o *RecordSet) GetUpdateFinished() (ret RecordSetGetUpdateFinishedRetType) { + ret, _ = o.GetUpdateFinishedOk() + return ret } // GetUpdateFinishedOk returns a tuple with the UpdateFinished field value // and a boolean to check if the value has been set. -func (o *RecordSet) GetUpdateFinishedOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.UpdateFinished, true +func (o *RecordSet) GetUpdateFinishedOk() (ret RecordSetGetUpdateFinishedRetType, ok bool) { + return getRecordSetGetUpdateFinishedAttributeTypeOk(o.UpdateFinished) } // SetUpdateFinished sets field value -func (o *RecordSet) SetUpdateFinished(v *string) { - o.UpdateFinished = v +func (o *RecordSet) SetUpdateFinished(v RecordSetGetUpdateFinishedRetType) { + setRecordSetGetUpdateFinishedAttributeType(&o.UpdateFinished, v) } // GetUpdateStarted returns the UpdateStarted field value -func (o *RecordSet) GetUpdateStarted() *string { - if o == nil || IsNil(o.UpdateStarted) { - var ret *string - return ret - } - - return o.UpdateStarted +func (o *RecordSet) GetUpdateStarted() (ret RecordSetGetUpdateStartedRetType) { + ret, _ = o.GetUpdateStartedOk() + return ret } // GetUpdateStartedOk returns a tuple with the UpdateStarted field value // and a boolean to check if the value has been set. -func (o *RecordSet) GetUpdateStartedOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.UpdateStarted, true +func (o *RecordSet) GetUpdateStartedOk() (ret RecordSetGetUpdateStartedRetType, ok bool) { + return getRecordSetGetUpdateStartedAttributeTypeOk(o.UpdateStarted) } // SetUpdateStarted sets field value -func (o *RecordSet) SetUpdateStarted(v *string) { - o.UpdateStarted = v +func (o *RecordSet) SetUpdateStarted(v RecordSetGetUpdateStartedRetType) { + setRecordSetGetUpdateStartedAttributeType(&o.UpdateStarted, v) } func (o RecordSet) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Active) { - toSerialize["active"] = o.Active + if val, ok := getRecordSetgetActiveAttributeTypeOk(o.Active); ok { + toSerialize["Active"] = val + } + if val, ok := getRecordSetGetCommentAttributeTypeOk(o.Comment); ok { + toSerialize["Comment"] = val + } + if val, ok := getRecordSetGetCreationFinishedAttributeTypeOk(o.CreationFinished); ok { + toSerialize["CreationFinished"] = val + } + if val, ok := getRecordSetGetCreationStartedAttributeTypeOk(o.CreationStarted); ok { + toSerialize["CreationStarted"] = val + } + if val, ok := getRecordSetGetErrorAttributeTypeOk(o.Error); ok { + toSerialize["Error"] = val + } + if val, ok := getRecordSetGetIdAttributeTypeOk(o.Id); ok { + toSerialize["Id"] = val + } + if val, ok := getRecordSetGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val + } + if val, ok := getRecordSetGetRecordsAttributeTypeOk(o.Records); ok { + toSerialize["Records"] = val + } + if val, ok := getRecordSetGetStateAttributeTypeOk(o.State); ok { + toSerialize["State"] = val + } + if val, ok := getRecordSetGetTtlAttributeTypeOk(o.Ttl); ok { + toSerialize["Ttl"] = val + } + if val, ok := getRecordSetGetTypeAttributeTypeOk(o.Type); ok { + toSerialize["Type"] = val } - if !IsNil(o.Comment) { - toSerialize["comment"] = o.Comment + if val, ok := getRecordSetGetUpdateFinishedAttributeTypeOk(o.UpdateFinished); ok { + toSerialize["UpdateFinished"] = val } - toSerialize["creationFinished"] = o.CreationFinished - toSerialize["creationStarted"] = o.CreationStarted - if !IsNil(o.Error) { - toSerialize["error"] = o.Error + if val, ok := getRecordSetGetUpdateStartedAttributeTypeOk(o.UpdateStarted); ok { + toSerialize["UpdateStarted"] = val } - toSerialize["id"] = o.Id - toSerialize["name"] = o.Name - toSerialize["records"] = o.Records - toSerialize["state"] = o.State - toSerialize["ttl"] = o.Ttl - toSerialize["type"] = o.Type - toSerialize["updateFinished"] = o.UpdateFinished - toSerialize["updateStarted"] = o.UpdateStarted return toSerialize, nil } diff --git a/services/dns/model_record_set_response.go b/services/dns/model_record_set_response.go index fc1d8203b..b340ae9ad 100644 --- a/services/dns/model_record_set_response.go +++ b/services/dns/model_record_set_response.go @@ -17,11 +17,52 @@ import ( // checks if the RecordSetResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &RecordSetResponse{} +/* + types and functions for message +*/ + +// isNotNullableString +type RecordSetResponseGetMessageAttributeType = *string + +func getRecordSetResponseGetMessageAttributeTypeOk(arg RecordSetResponseGetMessageAttributeType) (ret RecordSetResponseGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRecordSetResponseGetMessageAttributeType(arg *RecordSetResponseGetMessageAttributeType, val RecordSetResponseGetMessageRetType) { + *arg = &val +} + +type RecordSetResponseGetMessageArgType = string +type RecordSetResponseGetMessageRetType = string + +/* + types and functions for rrset +*/ + +// isModel +type RecordSetResponseGetRrsetAttributeType = *RecordSet +type RecordSetResponseGetRrsetArgType = RecordSet +type RecordSetResponseGetRrsetRetType = RecordSet + +func getRecordSetResponseGetRrsetAttributeTypeOk(arg RecordSetResponseGetRrsetAttributeType) (ret RecordSetResponseGetRrsetRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRecordSetResponseGetRrsetAttributeType(arg *RecordSetResponseGetRrsetAttributeType, val RecordSetResponseGetRrsetRetType) { + *arg = &val +} + // RecordSetResponse ResponseRRSet for rr set info. type RecordSetResponse struct { - Message *string `json:"message,omitempty"` + Message RecordSetResponseGetMessageAttributeType `json:"message,omitempty"` // REQUIRED - Rrset *RecordSet `json:"rrset"` + Rrset RecordSetResponseGetRrsetAttributeType `json:"rrset"` } type _RecordSetResponse RecordSetResponse @@ -30,9 +71,9 @@ type _RecordSetResponse RecordSetResponse // 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 NewRecordSetResponse(rrset *RecordSet) *RecordSetResponse { +func NewRecordSetResponse(rrset RecordSetResponseGetRrsetArgType) *RecordSetResponse { this := RecordSetResponse{} - this.Rrset = rrset + setRecordSetResponseGetRrsetAttributeType(&this.Rrset, rrset) return &this } @@ -45,67 +86,53 @@ func NewRecordSetResponseWithDefaults() *RecordSetResponse { } // GetMessage returns the Message field value if set, zero value otherwise. -func (o *RecordSetResponse) GetMessage() *string { - if o == nil || IsNil(o.Message) { - var ret *string - return ret - } - return o.Message +func (o *RecordSetResponse) GetMessage() (res RecordSetResponseGetMessageRetType) { + res, _ = o.GetMessageOk() + return } // GetMessageOk returns a tuple with the Message field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *RecordSetResponse) GetMessageOk() (*string, bool) { - if o == nil || IsNil(o.Message) { - return nil, false - } - return o.Message, true +func (o *RecordSetResponse) GetMessageOk() (ret RecordSetResponseGetMessageRetType, ok bool) { + return getRecordSetResponseGetMessageAttributeTypeOk(o.Message) } // HasMessage returns a boolean if a field has been set. func (o *RecordSetResponse) HasMessage() bool { - if o != nil && !IsNil(o.Message) { - return true - } - - return false + _, ok := o.GetMessageOk() + return ok } // SetMessage gets a reference to the given string and assigns it to the Message field. -func (o *RecordSetResponse) SetMessage(v *string) { - o.Message = v +func (o *RecordSetResponse) SetMessage(v RecordSetResponseGetMessageRetType) { + setRecordSetResponseGetMessageAttributeType(&o.Message, v) } // GetRrset returns the Rrset field value -func (o *RecordSetResponse) GetRrset() *RecordSet { - if o == nil || IsNil(o.Rrset) { - var ret *RecordSet - return ret - } - - return o.Rrset +func (o *RecordSetResponse) GetRrset() (ret RecordSetResponseGetRrsetRetType) { + ret, _ = o.GetRrsetOk() + return ret } // GetRrsetOk returns a tuple with the Rrset field value // and a boolean to check if the value has been set. -func (o *RecordSetResponse) GetRrsetOk() (*RecordSet, bool) { - if o == nil { - return nil, false - } - return o.Rrset, true +func (o *RecordSetResponse) GetRrsetOk() (ret RecordSetResponseGetRrsetRetType, ok bool) { + return getRecordSetResponseGetRrsetAttributeTypeOk(o.Rrset) } // SetRrset sets field value -func (o *RecordSetResponse) SetRrset(v *RecordSet) { - o.Rrset = v +func (o *RecordSetResponse) SetRrset(v RecordSetResponseGetRrsetRetType) { + setRecordSetResponseGetRrsetAttributeType(&o.Rrset, v) } func (o RecordSetResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Message) { - toSerialize["message"] = o.Message + if val, ok := getRecordSetResponseGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val + } + if val, ok := getRecordSetResponseGetRrsetAttributeTypeOk(o.Rrset); ok { + toSerialize["Rrset"] = val } - toSerialize["rrset"] = o.Rrset return toSerialize, nil } diff --git a/services/dns/model_validate_move_code_payload.go b/services/dns/model_validate_move_code_payload.go index 5a31af517..da8f834ca 100644 --- a/services/dns/model_validate_move_code_payload.go +++ b/services/dns/model_validate_move_code_payload.go @@ -17,11 +17,32 @@ import ( // checks if the ValidateMoveCodePayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ValidateMoveCodePayload{} +/* + types and functions for code +*/ + +// isNotNullableString +type ValidateMoveCodePayloadGetCodeAttributeType = *string + +func getValidateMoveCodePayloadGetCodeAttributeTypeOk(arg ValidateMoveCodePayloadGetCodeAttributeType) (ret ValidateMoveCodePayloadGetCodeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setValidateMoveCodePayloadGetCodeAttributeType(arg *ValidateMoveCodePayloadGetCodeAttributeType, val ValidateMoveCodePayloadGetCodeRetType) { + *arg = &val +} + +type ValidateMoveCodePayloadGetCodeArgType = string +type ValidateMoveCodePayloadGetCodeRetType = string + // ValidateMoveCodePayload PostValidateMoveCodeRequest body to validate move code request. type ValidateMoveCodePayload struct { // code that should be validated. It validates if it is valid, not expired and belongs to the zone. // REQUIRED - Code *string `json:"code"` + Code ValidateMoveCodePayloadGetCodeAttributeType `json:"code"` } type _ValidateMoveCodePayload ValidateMoveCodePayload @@ -30,9 +51,9 @@ type _ValidateMoveCodePayload ValidateMoveCodePayload // 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 NewValidateMoveCodePayload(code *string) *ValidateMoveCodePayload { +func NewValidateMoveCodePayload(code ValidateMoveCodePayloadGetCodeArgType) *ValidateMoveCodePayload { this := ValidateMoveCodePayload{} - this.Code = code + setValidateMoveCodePayloadGetCodeAttributeType(&this.Code, code) return &this } @@ -45,32 +66,27 @@ func NewValidateMoveCodePayloadWithDefaults() *ValidateMoveCodePayload { } // GetCode returns the Code field value -func (o *ValidateMoveCodePayload) GetCode() *string { - if o == nil || IsNil(o.Code) { - var ret *string - return ret - } - - return o.Code +func (o *ValidateMoveCodePayload) GetCode() (ret ValidateMoveCodePayloadGetCodeRetType) { + ret, _ = o.GetCodeOk() + return ret } // GetCodeOk returns a tuple with the Code field value // and a boolean to check if the value has been set. -func (o *ValidateMoveCodePayload) GetCodeOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Code, true +func (o *ValidateMoveCodePayload) GetCodeOk() (ret ValidateMoveCodePayloadGetCodeRetType, ok bool) { + return getValidateMoveCodePayloadGetCodeAttributeTypeOk(o.Code) } // SetCode sets field value -func (o *ValidateMoveCodePayload) SetCode(v *string) { - o.Code = v +func (o *ValidateMoveCodePayload) SetCode(v ValidateMoveCodePayloadGetCodeRetType) { + setValidateMoveCodePayloadGetCodeAttributeType(&o.Code, v) } func (o ValidateMoveCodePayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["code"] = o.Code + if val, ok := getValidateMoveCodePayloadGetCodeAttributeTypeOk(o.Code); ok { + toSerialize["Code"] = val + } return toSerialize, nil } diff --git a/services/dns/model_zone.go b/services/dns/model_zone.go index a65cf5e08..0d35c1d31 100644 --- a/services/dns/model_zone.go +++ b/services/dns/model_zone.go @@ -17,77 +17,636 @@ import ( // checks if the Zone type satisfies the MappedNullable interface at compile time var _ MappedNullable = &Zone{} +/* + types and functions for acl +*/ + +// isNotNullableString +type ZoneGetAclAttributeType = *string + +func getZoneGetAclAttributeTypeOk(arg ZoneGetAclAttributeType) (ret ZoneGetAclRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setZoneGetAclAttributeType(arg *ZoneGetAclAttributeType, val ZoneGetAclRetType) { + *arg = &val +} + +type ZoneGetAclArgType = string +type ZoneGetAclRetType = string + +/* + types and functions for active +*/ + +// isBoolean +type ZonegetActiveAttributeType = *bool +type ZonegetActiveArgType = bool +type ZonegetActiveRetType = bool + +func getZonegetActiveAttributeTypeOk(arg ZonegetActiveAttributeType) (ret ZonegetActiveRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setZonegetActiveAttributeType(arg *ZonegetActiveAttributeType, val ZonegetActiveRetType) { + *arg = &val +} + +/* + types and functions for contactEmail +*/ + +// isNotNullableString +type ZoneGetContactEmailAttributeType = *string + +func getZoneGetContactEmailAttributeTypeOk(arg ZoneGetContactEmailAttributeType) (ret ZoneGetContactEmailRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setZoneGetContactEmailAttributeType(arg *ZoneGetContactEmailAttributeType, val ZoneGetContactEmailRetType) { + *arg = &val +} + +type ZoneGetContactEmailArgType = string +type ZoneGetContactEmailRetType = string + +/* + types and functions for creationFinished +*/ + +// isNotNullableString +type ZoneGetCreationFinishedAttributeType = *string + +func getZoneGetCreationFinishedAttributeTypeOk(arg ZoneGetCreationFinishedAttributeType) (ret ZoneGetCreationFinishedRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setZoneGetCreationFinishedAttributeType(arg *ZoneGetCreationFinishedAttributeType, val ZoneGetCreationFinishedRetType) { + *arg = &val +} + +type ZoneGetCreationFinishedArgType = string +type ZoneGetCreationFinishedRetType = string + +/* + types and functions for creationStarted +*/ + +// isNotNullableString +type ZoneGetCreationStartedAttributeType = *string + +func getZoneGetCreationStartedAttributeTypeOk(arg ZoneGetCreationStartedAttributeType) (ret ZoneGetCreationStartedRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setZoneGetCreationStartedAttributeType(arg *ZoneGetCreationStartedAttributeType, val ZoneGetCreationStartedRetType) { + *arg = &val +} + +type ZoneGetCreationStartedArgType = string +type ZoneGetCreationStartedRetType = string + +/* + types and functions for defaultTTL +*/ + +// isInteger +type ZoneGetDefaultTTLAttributeType = *int64 +type ZoneGetDefaultTTLArgType = int64 +type ZoneGetDefaultTTLRetType = int64 + +func getZoneGetDefaultTTLAttributeTypeOk(arg ZoneGetDefaultTTLAttributeType) (ret ZoneGetDefaultTTLRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setZoneGetDefaultTTLAttributeType(arg *ZoneGetDefaultTTLAttributeType, val ZoneGetDefaultTTLRetType) { + *arg = &val +} + +/* + types and functions for description +*/ + +// isNotNullableString +type ZoneGetDescriptionAttributeType = *string + +func getZoneGetDescriptionAttributeTypeOk(arg ZoneGetDescriptionAttributeType) (ret ZoneGetDescriptionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setZoneGetDescriptionAttributeType(arg *ZoneGetDescriptionAttributeType, val ZoneGetDescriptionRetType) { + *arg = &val +} + +type ZoneGetDescriptionArgType = string +type ZoneGetDescriptionRetType = string + +/* + types and functions for dnsName +*/ + +// isNotNullableString +type ZoneGetDnsNameAttributeType = *string + +func getZoneGetDnsNameAttributeTypeOk(arg ZoneGetDnsNameAttributeType) (ret ZoneGetDnsNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setZoneGetDnsNameAttributeType(arg *ZoneGetDnsNameAttributeType, val ZoneGetDnsNameRetType) { + *arg = &val +} + +type ZoneGetDnsNameArgType = string +type ZoneGetDnsNameRetType = string + +/* + types and functions for error +*/ + +// isNotNullableString +type ZoneGetErrorAttributeType = *string + +func getZoneGetErrorAttributeTypeOk(arg ZoneGetErrorAttributeType) (ret ZoneGetErrorRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setZoneGetErrorAttributeType(arg *ZoneGetErrorAttributeType, val ZoneGetErrorRetType) { + *arg = &val +} + +type ZoneGetErrorArgType = string +type ZoneGetErrorRetType = string + +/* + types and functions for expireTime +*/ + +// isInteger +type ZoneGetExpireTimeAttributeType = *int64 +type ZoneGetExpireTimeArgType = int64 +type ZoneGetExpireTimeRetType = int64 + +func getZoneGetExpireTimeAttributeTypeOk(arg ZoneGetExpireTimeAttributeType) (ret ZoneGetExpireTimeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setZoneGetExpireTimeAttributeType(arg *ZoneGetExpireTimeAttributeType, val ZoneGetExpireTimeRetType) { + *arg = &val +} + +/* + types and functions for extensions +*/ + +// isModel +type ZoneGetExtensionsAttributeType = *DomainExtensions +type ZoneGetExtensionsArgType = DomainExtensions +type ZoneGetExtensionsRetType = DomainExtensions + +func getZoneGetExtensionsAttributeTypeOk(arg ZoneGetExtensionsAttributeType) (ret ZoneGetExtensionsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setZoneGetExtensionsAttributeType(arg *ZoneGetExtensionsAttributeType, val ZoneGetExtensionsRetType) { + *arg = &val +} + +/* + types and functions for id +*/ + +// isNotNullableString +type ZoneGetIdAttributeType = *string + +func getZoneGetIdAttributeTypeOk(arg ZoneGetIdAttributeType) (ret ZoneGetIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setZoneGetIdAttributeType(arg *ZoneGetIdAttributeType, val ZoneGetIdRetType) { + *arg = &val +} + +type ZoneGetIdArgType = string +type ZoneGetIdRetType = string + +/* + types and functions for isReverseZone +*/ + +// isBoolean +type ZonegetIsReverseZoneAttributeType = *bool +type ZonegetIsReverseZoneArgType = bool +type ZonegetIsReverseZoneRetType = bool + +func getZonegetIsReverseZoneAttributeTypeOk(arg ZonegetIsReverseZoneAttributeType) (ret ZonegetIsReverseZoneRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setZonegetIsReverseZoneAttributeType(arg *ZonegetIsReverseZoneAttributeType, val ZonegetIsReverseZoneRetType) { + *arg = &val +} + +/* + types and functions for labels +*/ + +// isArray +type ZoneGetLabelsAttributeType = *[]Label +type ZoneGetLabelsArgType = []Label +type ZoneGetLabelsRetType = []Label + +func getZoneGetLabelsAttributeTypeOk(arg ZoneGetLabelsAttributeType) (ret ZoneGetLabelsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setZoneGetLabelsAttributeType(arg *ZoneGetLabelsAttributeType, val ZoneGetLabelsRetType) { + *arg = &val +} + +/* + types and functions for name +*/ + +// isNotNullableString +type ZoneGetNameAttributeType = *string + +func getZoneGetNameAttributeTypeOk(arg ZoneGetNameAttributeType) (ret ZoneGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setZoneGetNameAttributeType(arg *ZoneGetNameAttributeType, val ZoneGetNameRetType) { + *arg = &val +} + +type ZoneGetNameArgType = string +type ZoneGetNameRetType = string + +/* + types and functions for negativeCache +*/ + +// isInteger +type ZoneGetNegativeCacheAttributeType = *int64 +type ZoneGetNegativeCacheArgType = int64 +type ZoneGetNegativeCacheRetType = int64 + +func getZoneGetNegativeCacheAttributeTypeOk(arg ZoneGetNegativeCacheAttributeType) (ret ZoneGetNegativeCacheRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setZoneGetNegativeCacheAttributeType(arg *ZoneGetNegativeCacheAttributeType, val ZoneGetNegativeCacheRetType) { + *arg = &val +} + +/* + types and functions for primaries +*/ + +// isArray +type ZoneGetPrimariesAttributeType = *[]string +type ZoneGetPrimariesArgType = []string +type ZoneGetPrimariesRetType = []string + +func getZoneGetPrimariesAttributeTypeOk(arg ZoneGetPrimariesAttributeType) (ret ZoneGetPrimariesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setZoneGetPrimariesAttributeType(arg *ZoneGetPrimariesAttributeType, val ZoneGetPrimariesRetType) { + *arg = &val +} + +/* + types and functions for primaryNameServer +*/ + +// isNotNullableString +type ZoneGetPrimaryNameServerAttributeType = *string + +func getZoneGetPrimaryNameServerAttributeTypeOk(arg ZoneGetPrimaryNameServerAttributeType) (ret ZoneGetPrimaryNameServerRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setZoneGetPrimaryNameServerAttributeType(arg *ZoneGetPrimaryNameServerAttributeType, val ZoneGetPrimaryNameServerRetType) { + *arg = &val +} + +type ZoneGetPrimaryNameServerArgType = string +type ZoneGetPrimaryNameServerRetType = string + +/* + types and functions for recordCount +*/ + +// isInteger +type ZoneGetRecordCountAttributeType = *int64 +type ZoneGetRecordCountArgType = int64 +type ZoneGetRecordCountRetType = int64 + +func getZoneGetRecordCountAttributeTypeOk(arg ZoneGetRecordCountAttributeType) (ret ZoneGetRecordCountRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setZoneGetRecordCountAttributeType(arg *ZoneGetRecordCountAttributeType, val ZoneGetRecordCountRetType) { + *arg = &val +} + +/* + types and functions for refreshTime +*/ + +// isInteger +type ZoneGetRefreshTimeAttributeType = *int64 +type ZoneGetRefreshTimeArgType = int64 +type ZoneGetRefreshTimeRetType = int64 + +func getZoneGetRefreshTimeAttributeTypeOk(arg ZoneGetRefreshTimeAttributeType) (ret ZoneGetRefreshTimeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setZoneGetRefreshTimeAttributeType(arg *ZoneGetRefreshTimeAttributeType, val ZoneGetRefreshTimeRetType) { + *arg = &val +} + +/* + types and functions for retryTime +*/ + +// isInteger +type ZoneGetRetryTimeAttributeType = *int64 +type ZoneGetRetryTimeArgType = int64 +type ZoneGetRetryTimeRetType = int64 + +func getZoneGetRetryTimeAttributeTypeOk(arg ZoneGetRetryTimeAttributeType) (ret ZoneGetRetryTimeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setZoneGetRetryTimeAttributeType(arg *ZoneGetRetryTimeAttributeType, val ZoneGetRetryTimeRetType) { + *arg = &val +} + +/* + types and functions for serialNumber +*/ + +// isInteger +type ZoneGetSerialNumberAttributeType = *int64 +type ZoneGetSerialNumberArgType = int64 +type ZoneGetSerialNumberRetType = int64 + +func getZoneGetSerialNumberAttributeTypeOk(arg ZoneGetSerialNumberAttributeType) (ret ZoneGetSerialNumberRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setZoneGetSerialNumberAttributeType(arg *ZoneGetSerialNumberAttributeType, val ZoneGetSerialNumberRetType) { + *arg = &val +} + +/* + types and functions for state +*/ + +// isEnumRef +type ZoneGetStateAttributeType = *string +type ZoneGetStateArgType = string +type ZoneGetStateRetType = string + +func getZoneGetStateAttributeTypeOk(arg ZoneGetStateAttributeType) (ret ZoneGetStateRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setZoneGetStateAttributeType(arg *ZoneGetStateAttributeType, val ZoneGetStateRetType) { + *arg = &val +} + +/* + types and functions for type +*/ + +// isEnumRef +type ZoneGetTypeAttributeType = *string +type ZoneGetTypeArgType = string +type ZoneGetTypeRetType = string + +func getZoneGetTypeAttributeTypeOk(arg ZoneGetTypeAttributeType) (ret ZoneGetTypeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setZoneGetTypeAttributeType(arg *ZoneGetTypeAttributeType, val ZoneGetTypeRetType) { + *arg = &val +} + +/* + types and functions for updateFinished +*/ + +// isNotNullableString +type ZoneGetUpdateFinishedAttributeType = *string + +func getZoneGetUpdateFinishedAttributeTypeOk(arg ZoneGetUpdateFinishedAttributeType) (ret ZoneGetUpdateFinishedRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setZoneGetUpdateFinishedAttributeType(arg *ZoneGetUpdateFinishedAttributeType, val ZoneGetUpdateFinishedRetType) { + *arg = &val +} + +type ZoneGetUpdateFinishedArgType = string +type ZoneGetUpdateFinishedRetType = string + +/* + types and functions for updateStarted +*/ + +// isNotNullableString +type ZoneGetUpdateStartedAttributeType = *string + +func getZoneGetUpdateStartedAttributeTypeOk(arg ZoneGetUpdateStartedAttributeType) (ret ZoneGetUpdateStartedRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setZoneGetUpdateStartedAttributeType(arg *ZoneGetUpdateStartedAttributeType, val ZoneGetUpdateStartedRetType) { + *arg = &val +} + +type ZoneGetUpdateStartedArgType = string +type ZoneGetUpdateStartedRetType = string + +/* + types and functions for visibility +*/ + +// isEnumRef +type ZoneGetVisibilityAttributeType = *string +type ZoneGetVisibilityArgType = string +type ZoneGetVisibilityRetType = string + +func getZoneGetVisibilityAttributeTypeOk(arg ZoneGetVisibilityAttributeType) (ret ZoneGetVisibilityRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setZoneGetVisibilityAttributeType(arg *ZoneGetVisibilityAttributeType, val ZoneGetVisibilityRetType) { + *arg = &val +} + // Zone Zone. type Zone struct { // access control list // REQUIRED - Acl *string `json:"acl"` - Active *bool `json:"active,omitempty"` + Acl ZoneGetAclAttributeType `json:"acl"` + Active ZonegetActiveAttributeType `json:"active,omitempty"` // contact email from soa record - ContactEmail *string `json:"contactEmail,omitempty"` + ContactEmail ZoneGetContactEmailAttributeType `json:"contactEmail,omitempty"` // when zone creation finished // REQUIRED - CreationFinished *string `json:"creationFinished"` + CreationFinished ZoneGetCreationFinishedAttributeType `json:"creationFinished"` // when zone creation started // REQUIRED - CreationStarted *string `json:"creationStarted"` + CreationStarted ZoneGetCreationStartedAttributeType `json:"creationStarted"` // default time to live + // Can be cast to int32 without loss of precision. // REQUIRED - DefaultTTL *int64 `json:"defaultTTL"` + DefaultTTL ZoneGetDefaultTTLAttributeType `json:"defaultTTL"` // description of the zone - Description *string `json:"description,omitempty"` + Description ZoneGetDescriptionAttributeType `json:"description,omitempty"` // zone name // REQUIRED - DnsName *string `json:"dnsName"` + DnsName ZoneGetDnsNameAttributeType `json:"dnsName"` // Error shows error in case create/update/delete failed - Error *string `json:"error,omitempty"` + Error ZoneGetErrorAttributeType `json:"error,omitempty"` // expire time + // Can be cast to int32 without loss of precision. // REQUIRED - ExpireTime *int64 `json:"expireTime"` - Extensions *DomainExtensions `json:"extensions,omitempty"` + ExpireTime ZoneGetExpireTimeAttributeType `json:"expireTime"` + Extensions ZoneGetExtensionsAttributeType `json:"extensions,omitempty"` // zone id // REQUIRED - Id *string `json:"id"` + Id ZoneGetIdAttributeType `json:"id"` // if the zone is a reverse zone or not - IsReverseZone *bool `json:"isReverseZone,omitempty"` - Labels *[]Label `json:"labels,omitempty"` + IsReverseZone ZonegetIsReverseZoneAttributeType `json:"isReverseZone,omitempty"` + Labels ZoneGetLabelsAttributeType `json:"labels,omitempty"` // user given name // REQUIRED - Name *string `json:"name"` + Name ZoneGetNameAttributeType `json:"name"` // negative caching + // Can be cast to int32 without loss of precision. // REQUIRED - NegativeCache *int64 `json:"negativeCache"` + NegativeCache ZoneGetNegativeCacheAttributeType `json:"negativeCache"` // primary name server for secondary zone - Primaries *[]string `json:"primaries,omitempty"` + Primaries ZoneGetPrimariesAttributeType `json:"primaries,omitempty"` // primary name server. FQDN // REQUIRED - PrimaryNameServer *string `json:"primaryNameServer"` + PrimaryNameServer ZoneGetPrimaryNameServerAttributeType `json:"primaryNameServer"` // record count how many records are in the zone - RecordCount *int64 `json:"recordCount,omitempty"` + // Can be cast to int32 without loss of precision. + RecordCount ZoneGetRecordCountAttributeType `json:"recordCount,omitempty"` // refresh time + // Can be cast to int32 without loss of precision. // REQUIRED - RefreshTime *int64 `json:"refreshTime"` + RefreshTime ZoneGetRefreshTimeAttributeType `json:"refreshTime"` // retry time + // Can be cast to int32 without loss of precision. // REQUIRED - RetryTime *int64 `json:"retryTime"` + RetryTime ZoneGetRetryTimeAttributeType `json:"retryTime"` // serial number + // Can be cast to int32 without loss of precision. // REQUIRED - SerialNumber *int64 `json:"serialNumber"` + SerialNumber ZoneGetSerialNumberAttributeType `json:"serialNumber"` // zone state // REQUIRED - State *string `json:"state"` + State ZoneGetStateAttributeType `json:"state"` // zone type // REQUIRED - Type *string `json:"type"` + Type ZoneGetTypeAttributeType `json:"type"` // when zone update/deletion finished // REQUIRED - UpdateFinished *string `json:"updateFinished"` + UpdateFinished ZoneGetUpdateFinishedAttributeType `json:"updateFinished"` // when zone update/deletion started // REQUIRED - UpdateStarted *string `json:"updateStarted"` + UpdateStarted ZoneGetUpdateStartedAttributeType `json:"updateStarted"` // visibility of the zone // REQUIRED - Visibility *string `json:"visibility"` + Visibility ZoneGetVisibilityAttributeType `json:"visibility"` } type _Zone Zone @@ -96,26 +655,26 @@ type _Zone Zone // 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 NewZone(acl *string, creationFinished *string, creationStarted *string, defaultTTL *int64, dnsName *string, expireTime *int64, id *string, name *string, negativeCache *int64, primaryNameServer *string, refreshTime *int64, retryTime *int64, serialNumber *int64, state *string, type_ *string, updateFinished *string, updateStarted *string, visibility *string) *Zone { +func NewZone(acl ZoneGetAclArgType, creationFinished ZoneGetCreationFinishedArgType, creationStarted ZoneGetCreationStartedArgType, defaultTTL ZoneGetDefaultTTLArgType, dnsName ZoneGetDnsNameArgType, expireTime ZoneGetExpireTimeArgType, id ZoneGetIdArgType, name ZoneGetNameArgType, negativeCache ZoneGetNegativeCacheArgType, primaryNameServer ZoneGetPrimaryNameServerArgType, refreshTime ZoneGetRefreshTimeArgType, retryTime ZoneGetRetryTimeArgType, serialNumber ZoneGetSerialNumberArgType, state ZoneGetStateArgType, type_ ZoneGetTypeArgType, updateFinished ZoneGetUpdateFinishedArgType, updateStarted ZoneGetUpdateStartedArgType, visibility ZoneGetVisibilityArgType) *Zone { this := Zone{} - this.Acl = acl - this.CreationFinished = creationFinished - this.CreationStarted = creationStarted - this.DefaultTTL = defaultTTL - this.DnsName = dnsName - this.ExpireTime = expireTime - this.Id = id - this.Name = name - this.NegativeCache = negativeCache - this.PrimaryNameServer = primaryNameServer - this.RefreshTime = refreshTime - this.RetryTime = retryTime - this.SerialNumber = serialNumber - this.State = state - this.Type = type_ - this.UpdateFinished = updateFinished - this.UpdateStarted = updateStarted - this.Visibility = visibility + setZoneGetAclAttributeType(&this.Acl, acl) + setZoneGetCreationFinishedAttributeType(&this.CreationFinished, creationFinished) + setZoneGetCreationStartedAttributeType(&this.CreationStarted, creationStarted) + setZoneGetDefaultTTLAttributeType(&this.DefaultTTL, defaultTTL) + setZoneGetDnsNameAttributeType(&this.DnsName, dnsName) + setZoneGetExpireTimeAttributeType(&this.ExpireTime, expireTime) + setZoneGetIdAttributeType(&this.Id, id) + setZoneGetNameAttributeType(&this.Name, name) + setZoneGetNegativeCacheAttributeType(&this.NegativeCache, negativeCache) + setZoneGetPrimaryNameServerAttributeType(&this.PrimaryNameServer, primaryNameServer) + setZoneGetRefreshTimeAttributeType(&this.RefreshTime, refreshTime) + setZoneGetRetryTimeAttributeType(&this.RetryTime, retryTime) + setZoneGetSerialNumberAttributeType(&this.SerialNumber, serialNumber) + setZoneGetStateAttributeType(&this.State, state) + setZoneGetTypeAttributeType(&this.Type, type_) + setZoneGetUpdateFinishedAttributeType(&this.UpdateFinished, updateFinished) + setZoneGetUpdateStartedAttributeType(&this.UpdateStarted, updateStarted) + setZoneGetVisibilityAttributeType(&this.Visibility, visibility) return &this } @@ -128,772 +687,601 @@ func NewZoneWithDefaults() *Zone { } // GetAcl returns the Acl field value -func (o *Zone) GetAcl() *string { - if o == nil || IsNil(o.Acl) { - var ret *string - return ret - } - - return o.Acl +func (o *Zone) GetAcl() (ret ZoneGetAclRetType) { + ret, _ = o.GetAclOk() + return ret } // GetAclOk returns a tuple with the Acl field value // and a boolean to check if the value has been set. -func (o *Zone) GetAclOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Acl, true +func (o *Zone) GetAclOk() (ret ZoneGetAclRetType, ok bool) { + return getZoneGetAclAttributeTypeOk(o.Acl) } // SetAcl sets field value -func (o *Zone) SetAcl(v *string) { - o.Acl = v +func (o *Zone) SetAcl(v ZoneGetAclRetType) { + setZoneGetAclAttributeType(&o.Acl, v) } // GetActive returns the Active field value if set, zero value otherwise. -func (o *Zone) GetActive() *bool { - if o == nil || IsNil(o.Active) { - var ret *bool - return ret - } - return o.Active +func (o *Zone) GetActive() (res ZonegetActiveRetType) { + res, _ = o.GetActiveOk() + return } // GetActiveOk returns a tuple with the Active field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Zone) GetActiveOk() (*bool, bool) { - if o == nil || IsNil(o.Active) { - return nil, false - } - return o.Active, true +func (o *Zone) GetActiveOk() (ret ZonegetActiveRetType, ok bool) { + return getZonegetActiveAttributeTypeOk(o.Active) } // HasActive returns a boolean if a field has been set. func (o *Zone) HasActive() bool { - if o != nil && !IsNil(o.Active) { - return true - } - - return false + _, ok := o.GetActiveOk() + return ok } // SetActive gets a reference to the given bool and assigns it to the Active field. -func (o *Zone) SetActive(v *bool) { - o.Active = v +func (o *Zone) SetActive(v ZonegetActiveRetType) { + setZonegetActiveAttributeType(&o.Active, v) } // GetContactEmail returns the ContactEmail field value if set, zero value otherwise. -func (o *Zone) GetContactEmail() *string { - if o == nil || IsNil(o.ContactEmail) { - var ret *string - return ret - } - return o.ContactEmail +func (o *Zone) GetContactEmail() (res ZoneGetContactEmailRetType) { + res, _ = o.GetContactEmailOk() + return } // GetContactEmailOk returns a tuple with the ContactEmail field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Zone) GetContactEmailOk() (*string, bool) { - if o == nil || IsNil(o.ContactEmail) { - return nil, false - } - return o.ContactEmail, true +func (o *Zone) GetContactEmailOk() (ret ZoneGetContactEmailRetType, ok bool) { + return getZoneGetContactEmailAttributeTypeOk(o.ContactEmail) } // HasContactEmail returns a boolean if a field has been set. func (o *Zone) HasContactEmail() bool { - if o != nil && !IsNil(o.ContactEmail) { - return true - } - - return false + _, ok := o.GetContactEmailOk() + return ok } // SetContactEmail gets a reference to the given string and assigns it to the ContactEmail field. -func (o *Zone) SetContactEmail(v *string) { - o.ContactEmail = v +func (o *Zone) SetContactEmail(v ZoneGetContactEmailRetType) { + setZoneGetContactEmailAttributeType(&o.ContactEmail, v) } // GetCreationFinished returns the CreationFinished field value -func (o *Zone) GetCreationFinished() *string { - if o == nil || IsNil(o.CreationFinished) { - var ret *string - return ret - } - - return o.CreationFinished +func (o *Zone) GetCreationFinished() (ret ZoneGetCreationFinishedRetType) { + ret, _ = o.GetCreationFinishedOk() + return ret } // GetCreationFinishedOk returns a tuple with the CreationFinished field value // and a boolean to check if the value has been set. -func (o *Zone) GetCreationFinishedOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.CreationFinished, true +func (o *Zone) GetCreationFinishedOk() (ret ZoneGetCreationFinishedRetType, ok bool) { + return getZoneGetCreationFinishedAttributeTypeOk(o.CreationFinished) } // SetCreationFinished sets field value -func (o *Zone) SetCreationFinished(v *string) { - o.CreationFinished = v +func (o *Zone) SetCreationFinished(v ZoneGetCreationFinishedRetType) { + setZoneGetCreationFinishedAttributeType(&o.CreationFinished, v) } // GetCreationStarted returns the CreationStarted field value -func (o *Zone) GetCreationStarted() *string { - if o == nil || IsNil(o.CreationStarted) { - var ret *string - return ret - } - - return o.CreationStarted +func (o *Zone) GetCreationStarted() (ret ZoneGetCreationStartedRetType) { + ret, _ = o.GetCreationStartedOk() + return ret } // GetCreationStartedOk returns a tuple with the CreationStarted field value // and a boolean to check if the value has been set. -func (o *Zone) GetCreationStartedOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.CreationStarted, true +func (o *Zone) GetCreationStartedOk() (ret ZoneGetCreationStartedRetType, ok bool) { + return getZoneGetCreationStartedAttributeTypeOk(o.CreationStarted) } // SetCreationStarted sets field value -func (o *Zone) SetCreationStarted(v *string) { - o.CreationStarted = v +func (o *Zone) SetCreationStarted(v ZoneGetCreationStartedRetType) { + setZoneGetCreationStartedAttributeType(&o.CreationStarted, v) } // GetDefaultTTL returns the DefaultTTL field value -func (o *Zone) GetDefaultTTL() *int64 { - if o == nil || IsNil(o.DefaultTTL) { - var ret *int64 - return ret - } - - return o.DefaultTTL +func (o *Zone) GetDefaultTTL() (ret ZoneGetDefaultTTLRetType) { + ret, _ = o.GetDefaultTTLOk() + return ret } // GetDefaultTTLOk returns a tuple with the DefaultTTL field value // and a boolean to check if the value has been set. -func (o *Zone) GetDefaultTTLOk() (*int64, bool) { - if o == nil { - return nil, false - } - return o.DefaultTTL, true +func (o *Zone) GetDefaultTTLOk() (ret ZoneGetDefaultTTLRetType, ok bool) { + return getZoneGetDefaultTTLAttributeTypeOk(o.DefaultTTL) } // SetDefaultTTL sets field value -func (o *Zone) SetDefaultTTL(v *int64) { - o.DefaultTTL = v +func (o *Zone) SetDefaultTTL(v ZoneGetDefaultTTLRetType) { + setZoneGetDefaultTTLAttributeType(&o.DefaultTTL, v) } // GetDescription returns the Description field value if set, zero value otherwise. -func (o *Zone) GetDescription() *string { - if o == nil || IsNil(o.Description) { - var ret *string - return ret - } - return o.Description +func (o *Zone) GetDescription() (res ZoneGetDescriptionRetType) { + res, _ = o.GetDescriptionOk() + return } // 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 *Zone) GetDescriptionOk() (*string, bool) { - if o == nil || IsNil(o.Description) { - return nil, false - } - return o.Description, true +func (o *Zone) GetDescriptionOk() (ret ZoneGetDescriptionRetType, ok bool) { + return getZoneGetDescriptionAttributeTypeOk(o.Description) } // HasDescription returns a boolean if a field has been set. func (o *Zone) HasDescription() bool { - if o != nil && !IsNil(o.Description) { - return true - } - - return false + _, ok := o.GetDescriptionOk() + return ok } // SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *Zone) SetDescription(v *string) { - o.Description = v +func (o *Zone) SetDescription(v ZoneGetDescriptionRetType) { + setZoneGetDescriptionAttributeType(&o.Description, v) } // GetDnsName returns the DnsName field value -func (o *Zone) GetDnsName() *string { - if o == nil || IsNil(o.DnsName) { - var ret *string - return ret - } - - return o.DnsName +func (o *Zone) GetDnsName() (ret ZoneGetDnsNameRetType) { + ret, _ = o.GetDnsNameOk() + return ret } // GetDnsNameOk returns a tuple with the DnsName field value // and a boolean to check if the value has been set. -func (o *Zone) GetDnsNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.DnsName, true +func (o *Zone) GetDnsNameOk() (ret ZoneGetDnsNameRetType, ok bool) { + return getZoneGetDnsNameAttributeTypeOk(o.DnsName) } // SetDnsName sets field value -func (o *Zone) SetDnsName(v *string) { - o.DnsName = v +func (o *Zone) SetDnsName(v ZoneGetDnsNameRetType) { + setZoneGetDnsNameAttributeType(&o.DnsName, v) } // GetError returns the Error field value if set, zero value otherwise. -func (o *Zone) GetError() *string { - if o == nil || IsNil(o.Error) { - var ret *string - return ret - } - return o.Error +func (o *Zone) GetError() (res ZoneGetErrorRetType) { + res, _ = o.GetErrorOk() + return } // GetErrorOk returns a tuple with the Error field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Zone) GetErrorOk() (*string, bool) { - if o == nil || IsNil(o.Error) { - return nil, false - } - return o.Error, true +func (o *Zone) GetErrorOk() (ret ZoneGetErrorRetType, ok bool) { + return getZoneGetErrorAttributeTypeOk(o.Error) } // HasError returns a boolean if a field has been set. func (o *Zone) HasError() bool { - if o != nil && !IsNil(o.Error) { - return true - } - - return false + _, ok := o.GetErrorOk() + return ok } // SetError gets a reference to the given string and assigns it to the Error field. -func (o *Zone) SetError(v *string) { - o.Error = v +func (o *Zone) SetError(v ZoneGetErrorRetType) { + setZoneGetErrorAttributeType(&o.Error, v) } // GetExpireTime returns the ExpireTime field value -func (o *Zone) GetExpireTime() *int64 { - if o == nil || IsNil(o.ExpireTime) { - var ret *int64 - return ret - } - - return o.ExpireTime +func (o *Zone) GetExpireTime() (ret ZoneGetExpireTimeRetType) { + ret, _ = o.GetExpireTimeOk() + return ret } // GetExpireTimeOk returns a tuple with the ExpireTime field value // and a boolean to check if the value has been set. -func (o *Zone) GetExpireTimeOk() (*int64, bool) { - if o == nil { - return nil, false - } - return o.ExpireTime, true +func (o *Zone) GetExpireTimeOk() (ret ZoneGetExpireTimeRetType, ok bool) { + return getZoneGetExpireTimeAttributeTypeOk(o.ExpireTime) } // SetExpireTime sets field value -func (o *Zone) SetExpireTime(v *int64) { - o.ExpireTime = v +func (o *Zone) SetExpireTime(v ZoneGetExpireTimeRetType) { + setZoneGetExpireTimeAttributeType(&o.ExpireTime, v) } // GetExtensions returns the Extensions field value if set, zero value otherwise. -func (o *Zone) GetExtensions() *DomainExtensions { - if o == nil || IsNil(o.Extensions) { - var ret *DomainExtensions - return ret - } - return o.Extensions +func (o *Zone) GetExtensions() (res ZoneGetExtensionsRetType) { + res, _ = o.GetExtensionsOk() + return } // GetExtensionsOk returns a tuple with the Extensions field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Zone) GetExtensionsOk() (*DomainExtensions, bool) { - if o == nil || IsNil(o.Extensions) { - return nil, false - } - return o.Extensions, true +func (o *Zone) GetExtensionsOk() (ret ZoneGetExtensionsRetType, ok bool) { + return getZoneGetExtensionsAttributeTypeOk(o.Extensions) } // HasExtensions returns a boolean if a field has been set. func (o *Zone) HasExtensions() bool { - if o != nil && !IsNil(o.Extensions) { - return true - } - - return false + _, ok := o.GetExtensionsOk() + return ok } // SetExtensions gets a reference to the given DomainExtensions and assigns it to the Extensions field. -func (o *Zone) SetExtensions(v *DomainExtensions) { - o.Extensions = v +func (o *Zone) SetExtensions(v ZoneGetExtensionsRetType) { + setZoneGetExtensionsAttributeType(&o.Extensions, v) } // GetId returns the Id field value -func (o *Zone) GetId() *string { - if o == nil || IsNil(o.Id) { - var ret *string - return ret - } - - return o.Id +func (o *Zone) GetId() (ret ZoneGetIdRetType) { + ret, _ = o.GetIdOk() + return ret } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. -func (o *Zone) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Id, true +func (o *Zone) GetIdOk() (ret ZoneGetIdRetType, ok bool) { + return getZoneGetIdAttributeTypeOk(o.Id) } // SetId sets field value -func (o *Zone) SetId(v *string) { - o.Id = v +func (o *Zone) SetId(v ZoneGetIdRetType) { + setZoneGetIdAttributeType(&o.Id, v) } // GetIsReverseZone returns the IsReverseZone field value if set, zero value otherwise. -func (o *Zone) GetIsReverseZone() *bool { - if o == nil || IsNil(o.IsReverseZone) { - var ret *bool - return ret - } - return o.IsReverseZone +func (o *Zone) GetIsReverseZone() (res ZonegetIsReverseZoneRetType) { + res, _ = o.GetIsReverseZoneOk() + return } // GetIsReverseZoneOk returns a tuple with the IsReverseZone field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Zone) GetIsReverseZoneOk() (*bool, bool) { - if o == nil || IsNil(o.IsReverseZone) { - return nil, false - } - return o.IsReverseZone, true +func (o *Zone) GetIsReverseZoneOk() (ret ZonegetIsReverseZoneRetType, ok bool) { + return getZonegetIsReverseZoneAttributeTypeOk(o.IsReverseZone) } // HasIsReverseZone returns a boolean if a field has been set. func (o *Zone) HasIsReverseZone() bool { - if o != nil && !IsNil(o.IsReverseZone) { - return true - } - - return false + _, ok := o.GetIsReverseZoneOk() + return ok } // SetIsReverseZone gets a reference to the given bool and assigns it to the IsReverseZone field. -func (o *Zone) SetIsReverseZone(v *bool) { - o.IsReverseZone = v +func (o *Zone) SetIsReverseZone(v ZonegetIsReverseZoneRetType) { + setZonegetIsReverseZoneAttributeType(&o.IsReverseZone, v) } // GetLabels returns the Labels field value if set, zero value otherwise. -func (o *Zone) GetLabels() *[]Label { - if o == nil || IsNil(o.Labels) { - var ret *[]Label - return ret - } - return o.Labels +func (o *Zone) GetLabels() (res ZoneGetLabelsRetType) { + res, _ = o.GetLabelsOk() + return } // GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Zone) GetLabelsOk() (*[]Label, bool) { - if o == nil || IsNil(o.Labels) { - return nil, false - } - return o.Labels, true +func (o *Zone) GetLabelsOk() (ret ZoneGetLabelsRetType, ok bool) { + return getZoneGetLabelsAttributeTypeOk(o.Labels) } // HasLabels returns a boolean if a field has been set. func (o *Zone) HasLabels() bool { - if o != nil && !IsNil(o.Labels) { - return true - } - - return false + _, ok := o.GetLabelsOk() + return ok } // SetLabels gets a reference to the given []Label and assigns it to the Labels field. -func (o *Zone) SetLabels(v *[]Label) { - o.Labels = v +func (o *Zone) SetLabels(v ZoneGetLabelsRetType) { + setZoneGetLabelsAttributeType(&o.Labels, v) } // GetName returns the Name field value -func (o *Zone) GetName() *string { - if o == nil || IsNil(o.Name) { - var ret *string - return ret - } - - return o.Name +func (o *Zone) GetName() (ret ZoneGetNameRetType) { + ret, _ = o.GetNameOk() + return ret } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. -func (o *Zone) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Name, true +func (o *Zone) GetNameOk() (ret ZoneGetNameRetType, ok bool) { + return getZoneGetNameAttributeTypeOk(o.Name) } // SetName sets field value -func (o *Zone) SetName(v *string) { - o.Name = v +func (o *Zone) SetName(v ZoneGetNameRetType) { + setZoneGetNameAttributeType(&o.Name, v) } // GetNegativeCache returns the NegativeCache field value -func (o *Zone) GetNegativeCache() *int64 { - if o == nil || IsNil(o.NegativeCache) { - var ret *int64 - return ret - } - - return o.NegativeCache +func (o *Zone) GetNegativeCache() (ret ZoneGetNegativeCacheRetType) { + ret, _ = o.GetNegativeCacheOk() + return ret } // GetNegativeCacheOk returns a tuple with the NegativeCache field value // and a boolean to check if the value has been set. -func (o *Zone) GetNegativeCacheOk() (*int64, bool) { - if o == nil { - return nil, false - } - return o.NegativeCache, true +func (o *Zone) GetNegativeCacheOk() (ret ZoneGetNegativeCacheRetType, ok bool) { + return getZoneGetNegativeCacheAttributeTypeOk(o.NegativeCache) } // SetNegativeCache sets field value -func (o *Zone) SetNegativeCache(v *int64) { - o.NegativeCache = v +func (o *Zone) SetNegativeCache(v ZoneGetNegativeCacheRetType) { + setZoneGetNegativeCacheAttributeType(&o.NegativeCache, v) } // GetPrimaries returns the Primaries field value if set, zero value otherwise. -func (o *Zone) GetPrimaries() *[]string { - if o == nil || IsNil(o.Primaries) { - var ret *[]string - return ret - } - return o.Primaries +func (o *Zone) GetPrimaries() (res ZoneGetPrimariesRetType) { + res, _ = o.GetPrimariesOk() + return } // GetPrimariesOk returns a tuple with the Primaries field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Zone) GetPrimariesOk() (*[]string, bool) { - if o == nil || IsNil(o.Primaries) { - return nil, false - } - return o.Primaries, true +func (o *Zone) GetPrimariesOk() (ret ZoneGetPrimariesRetType, ok bool) { + return getZoneGetPrimariesAttributeTypeOk(o.Primaries) } // HasPrimaries returns a boolean if a field has been set. func (o *Zone) HasPrimaries() bool { - if o != nil && !IsNil(o.Primaries) { - return true - } - - return false + _, ok := o.GetPrimariesOk() + return ok } // SetPrimaries gets a reference to the given []string and assigns it to the Primaries field. -func (o *Zone) SetPrimaries(v *[]string) { - o.Primaries = v +func (o *Zone) SetPrimaries(v ZoneGetPrimariesRetType) { + setZoneGetPrimariesAttributeType(&o.Primaries, v) } // GetPrimaryNameServer returns the PrimaryNameServer field value -func (o *Zone) GetPrimaryNameServer() *string { - if o == nil || IsNil(o.PrimaryNameServer) { - var ret *string - return ret - } - - return o.PrimaryNameServer +func (o *Zone) GetPrimaryNameServer() (ret ZoneGetPrimaryNameServerRetType) { + ret, _ = o.GetPrimaryNameServerOk() + return ret } // GetPrimaryNameServerOk returns a tuple with the PrimaryNameServer field value // and a boolean to check if the value has been set. -func (o *Zone) GetPrimaryNameServerOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.PrimaryNameServer, true +func (o *Zone) GetPrimaryNameServerOk() (ret ZoneGetPrimaryNameServerRetType, ok bool) { + return getZoneGetPrimaryNameServerAttributeTypeOk(o.PrimaryNameServer) } // SetPrimaryNameServer sets field value -func (o *Zone) SetPrimaryNameServer(v *string) { - o.PrimaryNameServer = v +func (o *Zone) SetPrimaryNameServer(v ZoneGetPrimaryNameServerRetType) { + setZoneGetPrimaryNameServerAttributeType(&o.PrimaryNameServer, v) } // GetRecordCount returns the RecordCount field value if set, zero value otherwise. -func (o *Zone) GetRecordCount() *int64 { - if o == nil || IsNil(o.RecordCount) { - var ret *int64 - return ret - } - return o.RecordCount +func (o *Zone) GetRecordCount() (res ZoneGetRecordCountRetType) { + res, _ = o.GetRecordCountOk() + return } // GetRecordCountOk returns a tuple with the RecordCount field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Zone) GetRecordCountOk() (*int64, bool) { - if o == nil || IsNil(o.RecordCount) { - return nil, false - } - return o.RecordCount, true +func (o *Zone) GetRecordCountOk() (ret ZoneGetRecordCountRetType, ok bool) { + return getZoneGetRecordCountAttributeTypeOk(o.RecordCount) } // HasRecordCount returns a boolean if a field has been set. func (o *Zone) HasRecordCount() bool { - if o != nil && !IsNil(o.RecordCount) { - return true - } - - return false + _, ok := o.GetRecordCountOk() + return ok } // SetRecordCount gets a reference to the given int64 and assigns it to the RecordCount field. -func (o *Zone) SetRecordCount(v *int64) { - o.RecordCount = v +func (o *Zone) SetRecordCount(v ZoneGetRecordCountRetType) { + setZoneGetRecordCountAttributeType(&o.RecordCount, v) } // GetRefreshTime returns the RefreshTime field value -func (o *Zone) GetRefreshTime() *int64 { - if o == nil || IsNil(o.RefreshTime) { - var ret *int64 - return ret - } - - return o.RefreshTime +func (o *Zone) GetRefreshTime() (ret ZoneGetRefreshTimeRetType) { + ret, _ = o.GetRefreshTimeOk() + return ret } // GetRefreshTimeOk returns a tuple with the RefreshTime field value // and a boolean to check if the value has been set. -func (o *Zone) GetRefreshTimeOk() (*int64, bool) { - if o == nil { - return nil, false - } - return o.RefreshTime, true +func (o *Zone) GetRefreshTimeOk() (ret ZoneGetRefreshTimeRetType, ok bool) { + return getZoneGetRefreshTimeAttributeTypeOk(o.RefreshTime) } // SetRefreshTime sets field value -func (o *Zone) SetRefreshTime(v *int64) { - o.RefreshTime = v +func (o *Zone) SetRefreshTime(v ZoneGetRefreshTimeRetType) { + setZoneGetRefreshTimeAttributeType(&o.RefreshTime, v) } // GetRetryTime returns the RetryTime field value -func (o *Zone) GetRetryTime() *int64 { - if o == nil || IsNil(o.RetryTime) { - var ret *int64 - return ret - } - - return o.RetryTime +func (o *Zone) GetRetryTime() (ret ZoneGetRetryTimeRetType) { + ret, _ = o.GetRetryTimeOk() + return ret } // GetRetryTimeOk returns a tuple with the RetryTime field value // and a boolean to check if the value has been set. -func (o *Zone) GetRetryTimeOk() (*int64, bool) { - if o == nil { - return nil, false - } - return o.RetryTime, true +func (o *Zone) GetRetryTimeOk() (ret ZoneGetRetryTimeRetType, ok bool) { + return getZoneGetRetryTimeAttributeTypeOk(o.RetryTime) } // SetRetryTime sets field value -func (o *Zone) SetRetryTime(v *int64) { - o.RetryTime = v +func (o *Zone) SetRetryTime(v ZoneGetRetryTimeRetType) { + setZoneGetRetryTimeAttributeType(&o.RetryTime, v) } // GetSerialNumber returns the SerialNumber field value -func (o *Zone) GetSerialNumber() *int64 { - if o == nil || IsNil(o.SerialNumber) { - var ret *int64 - return ret - } - - return o.SerialNumber +func (o *Zone) GetSerialNumber() (ret ZoneGetSerialNumberRetType) { + ret, _ = o.GetSerialNumberOk() + return ret } // GetSerialNumberOk returns a tuple with the SerialNumber field value // and a boolean to check if the value has been set. -func (o *Zone) GetSerialNumberOk() (*int64, bool) { - if o == nil { - return nil, false - } - return o.SerialNumber, true +func (o *Zone) GetSerialNumberOk() (ret ZoneGetSerialNumberRetType, ok bool) { + return getZoneGetSerialNumberAttributeTypeOk(o.SerialNumber) } // SetSerialNumber sets field value -func (o *Zone) SetSerialNumber(v *int64) { - o.SerialNumber = v +func (o *Zone) SetSerialNumber(v ZoneGetSerialNumberRetType) { + setZoneGetSerialNumberAttributeType(&o.SerialNumber, v) } // GetState returns the State field value -func (o *Zone) GetState() *string { - if o == nil || IsNil(o.State) { - var ret *string - return ret - } - - return o.State +func (o *Zone) GetState() (ret ZoneGetStateRetType) { + ret, _ = o.GetStateOk() + return ret } // GetStateOk returns a tuple with the State field value // and a boolean to check if the value has been set. -func (o *Zone) GetStateOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.State, true +func (o *Zone) GetStateOk() (ret ZoneGetStateRetType, ok bool) { + return getZoneGetStateAttributeTypeOk(o.State) } // SetState sets field value -func (o *Zone) SetState(v *string) { - o.State = v +func (o *Zone) SetState(v ZoneGetStateRetType) { + setZoneGetStateAttributeType(&o.State, v) } // GetType returns the Type field value -func (o *Zone) GetType() *string { - if o == nil || IsNil(o.Type) { - var ret *string - return ret - } - - return o.Type +func (o *Zone) GetType() (ret ZoneGetTypeRetType) { + ret, _ = o.GetTypeOk() + return ret } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. -func (o *Zone) GetTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Type, true +func (o *Zone) GetTypeOk() (ret ZoneGetTypeRetType, ok bool) { + return getZoneGetTypeAttributeTypeOk(o.Type) } // SetType sets field value -func (o *Zone) SetType(v *string) { - o.Type = v +func (o *Zone) SetType(v ZoneGetTypeRetType) { + setZoneGetTypeAttributeType(&o.Type, v) } // GetUpdateFinished returns the UpdateFinished field value -func (o *Zone) GetUpdateFinished() *string { - if o == nil || IsNil(o.UpdateFinished) { - var ret *string - return ret - } - - return o.UpdateFinished +func (o *Zone) GetUpdateFinished() (ret ZoneGetUpdateFinishedRetType) { + ret, _ = o.GetUpdateFinishedOk() + return ret } // GetUpdateFinishedOk returns a tuple with the UpdateFinished field value // and a boolean to check if the value has been set. -func (o *Zone) GetUpdateFinishedOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.UpdateFinished, true +func (o *Zone) GetUpdateFinishedOk() (ret ZoneGetUpdateFinishedRetType, ok bool) { + return getZoneGetUpdateFinishedAttributeTypeOk(o.UpdateFinished) } // SetUpdateFinished sets field value -func (o *Zone) SetUpdateFinished(v *string) { - o.UpdateFinished = v +func (o *Zone) SetUpdateFinished(v ZoneGetUpdateFinishedRetType) { + setZoneGetUpdateFinishedAttributeType(&o.UpdateFinished, v) } // GetUpdateStarted returns the UpdateStarted field value -func (o *Zone) GetUpdateStarted() *string { - if o == nil || IsNil(o.UpdateStarted) { - var ret *string - return ret - } - - return o.UpdateStarted +func (o *Zone) GetUpdateStarted() (ret ZoneGetUpdateStartedRetType) { + ret, _ = o.GetUpdateStartedOk() + return ret } // GetUpdateStartedOk returns a tuple with the UpdateStarted field value // and a boolean to check if the value has been set. -func (o *Zone) GetUpdateStartedOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.UpdateStarted, true +func (o *Zone) GetUpdateStartedOk() (ret ZoneGetUpdateStartedRetType, ok bool) { + return getZoneGetUpdateStartedAttributeTypeOk(o.UpdateStarted) } // SetUpdateStarted sets field value -func (o *Zone) SetUpdateStarted(v *string) { - o.UpdateStarted = v +func (o *Zone) SetUpdateStarted(v ZoneGetUpdateStartedRetType) { + setZoneGetUpdateStartedAttributeType(&o.UpdateStarted, v) } // GetVisibility returns the Visibility field value -func (o *Zone) GetVisibility() *string { - if o == nil || IsNil(o.Visibility) { - var ret *string - return ret - } - - return o.Visibility +func (o *Zone) GetVisibility() (ret ZoneGetVisibilityRetType) { + ret, _ = o.GetVisibilityOk() + return ret } // GetVisibilityOk returns a tuple with the Visibility field value // and a boolean to check if the value has been set. -func (o *Zone) GetVisibilityOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Visibility, true +func (o *Zone) GetVisibilityOk() (ret ZoneGetVisibilityRetType, ok bool) { + return getZoneGetVisibilityAttributeTypeOk(o.Visibility) } // SetVisibility sets field value -func (o *Zone) SetVisibility(v *string) { - o.Visibility = v +func (o *Zone) SetVisibility(v ZoneGetVisibilityRetType) { + setZoneGetVisibilityAttributeType(&o.Visibility, v) } func (o Zone) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["acl"] = o.Acl - if !IsNil(o.Active) { - toSerialize["active"] = o.Active - } - if !IsNil(o.ContactEmail) { - toSerialize["contactEmail"] = o.ContactEmail - } - toSerialize["creationFinished"] = o.CreationFinished - toSerialize["creationStarted"] = o.CreationStarted - toSerialize["defaultTTL"] = o.DefaultTTL - if !IsNil(o.Description) { - toSerialize["description"] = o.Description - } - toSerialize["dnsName"] = o.DnsName - if !IsNil(o.Error) { - toSerialize["error"] = o.Error - } - toSerialize["expireTime"] = o.ExpireTime - if !IsNil(o.Extensions) { - toSerialize["extensions"] = o.Extensions - } - toSerialize["id"] = o.Id - if !IsNil(o.IsReverseZone) { - toSerialize["isReverseZone"] = o.IsReverseZone - } - if !IsNil(o.Labels) { - toSerialize["labels"] = o.Labels - } - toSerialize["name"] = o.Name - toSerialize["negativeCache"] = o.NegativeCache - if !IsNil(o.Primaries) { - toSerialize["primaries"] = o.Primaries - } - toSerialize["primaryNameServer"] = o.PrimaryNameServer - if !IsNil(o.RecordCount) { - toSerialize["recordCount"] = o.RecordCount - } - toSerialize["refreshTime"] = o.RefreshTime - toSerialize["retryTime"] = o.RetryTime - toSerialize["serialNumber"] = o.SerialNumber - toSerialize["state"] = o.State - toSerialize["type"] = o.Type - toSerialize["updateFinished"] = o.UpdateFinished - toSerialize["updateStarted"] = o.UpdateStarted - toSerialize["visibility"] = o.Visibility + if val, ok := getZoneGetAclAttributeTypeOk(o.Acl); ok { + toSerialize["Acl"] = val + } + if val, ok := getZonegetActiveAttributeTypeOk(o.Active); ok { + toSerialize["Active"] = val + } + if val, ok := getZoneGetContactEmailAttributeTypeOk(o.ContactEmail); ok { + toSerialize["ContactEmail"] = val + } + if val, ok := getZoneGetCreationFinishedAttributeTypeOk(o.CreationFinished); ok { + toSerialize["CreationFinished"] = val + } + if val, ok := getZoneGetCreationStartedAttributeTypeOk(o.CreationStarted); ok { + toSerialize["CreationStarted"] = val + } + if val, ok := getZoneGetDefaultTTLAttributeTypeOk(o.DefaultTTL); ok { + toSerialize["DefaultTTL"] = val + } + if val, ok := getZoneGetDescriptionAttributeTypeOk(o.Description); ok { + toSerialize["Description"] = val + } + if val, ok := getZoneGetDnsNameAttributeTypeOk(o.DnsName); ok { + toSerialize["DnsName"] = val + } + if val, ok := getZoneGetErrorAttributeTypeOk(o.Error); ok { + toSerialize["Error"] = val + } + if val, ok := getZoneGetExpireTimeAttributeTypeOk(o.ExpireTime); ok { + toSerialize["ExpireTime"] = val + } + if val, ok := getZoneGetExtensionsAttributeTypeOk(o.Extensions); ok { + toSerialize["Extensions"] = val + } + if val, ok := getZoneGetIdAttributeTypeOk(o.Id); ok { + toSerialize["Id"] = val + } + if val, ok := getZonegetIsReverseZoneAttributeTypeOk(o.IsReverseZone); ok { + toSerialize["IsReverseZone"] = val + } + if val, ok := getZoneGetLabelsAttributeTypeOk(o.Labels); ok { + toSerialize["Labels"] = val + } + if val, ok := getZoneGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val + } + if val, ok := getZoneGetNegativeCacheAttributeTypeOk(o.NegativeCache); ok { + toSerialize["NegativeCache"] = val + } + if val, ok := getZoneGetPrimariesAttributeTypeOk(o.Primaries); ok { + toSerialize["Primaries"] = val + } + if val, ok := getZoneGetPrimaryNameServerAttributeTypeOk(o.PrimaryNameServer); ok { + toSerialize["PrimaryNameServer"] = val + } + if val, ok := getZoneGetRecordCountAttributeTypeOk(o.RecordCount); ok { + toSerialize["RecordCount"] = val + } + if val, ok := getZoneGetRefreshTimeAttributeTypeOk(o.RefreshTime); ok { + toSerialize["RefreshTime"] = val + } + if val, ok := getZoneGetRetryTimeAttributeTypeOk(o.RetryTime); ok { + toSerialize["RetryTime"] = val + } + if val, ok := getZoneGetSerialNumberAttributeTypeOk(o.SerialNumber); ok { + toSerialize["SerialNumber"] = val + } + if val, ok := getZoneGetStateAttributeTypeOk(o.State); ok { + toSerialize["State"] = val + } + if val, ok := getZoneGetTypeAttributeTypeOk(o.Type); ok { + toSerialize["Type"] = val + } + if val, ok := getZoneGetUpdateFinishedAttributeTypeOk(o.UpdateFinished); ok { + toSerialize["UpdateFinished"] = val + } + if val, ok := getZoneGetUpdateStartedAttributeTypeOk(o.UpdateStarted); ok { + toSerialize["UpdateStarted"] = val + } + if val, ok := getZoneGetVisibilityAttributeTypeOk(o.Visibility); ok { + toSerialize["Visibility"] = val + } return toSerialize, nil } diff --git a/services/dns/model_zone_data_exchange.go b/services/dns/model_zone_data_exchange.go index c24bb12c3..bf349041a 100644 --- a/services/dns/model_zone_data_exchange.go +++ b/services/dns/model_zone_data_exchange.go @@ -17,9 +17,29 @@ import ( // checks if the ZoneDataExchange type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ZoneDataExchange{} +/* + types and functions for rrSets +*/ + +// isArray +type ZoneDataExchangeGetRrSetsAttributeType = *[]RecordDataExchange +type ZoneDataExchangeGetRrSetsArgType = []RecordDataExchange +type ZoneDataExchangeGetRrSetsRetType = []RecordDataExchange + +func getZoneDataExchangeGetRrSetsAttributeTypeOk(arg ZoneDataExchangeGetRrSetsAttributeType) (ret ZoneDataExchangeGetRrSetsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setZoneDataExchangeGetRrSetsAttributeType(arg *ZoneDataExchangeGetRrSetsAttributeType, val ZoneDataExchangeGetRrSetsRetType) { + *arg = &val +} + // ZoneDataExchange struct for ZoneDataExchange type ZoneDataExchange struct { - RrSets *[]RecordDataExchange `json:"rrSets,omitempty"` + RrSets ZoneDataExchangeGetRrSetsAttributeType `json:"rrSets,omitempty"` } // NewZoneDataExchange instantiates a new ZoneDataExchange object @@ -40,41 +60,32 @@ func NewZoneDataExchangeWithDefaults() *ZoneDataExchange { } // GetRrSets returns the RrSets field value if set, zero value otherwise. -func (o *ZoneDataExchange) GetRrSets() *[]RecordDataExchange { - if o == nil || IsNil(o.RrSets) { - var ret *[]RecordDataExchange - return ret - } - return o.RrSets +func (o *ZoneDataExchange) GetRrSets() (res ZoneDataExchangeGetRrSetsRetType) { + res, _ = o.GetRrSetsOk() + return } // GetRrSetsOk returns a tuple with the RrSets field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ZoneDataExchange) GetRrSetsOk() (*[]RecordDataExchange, bool) { - if o == nil || IsNil(o.RrSets) { - return nil, false - } - return o.RrSets, true +func (o *ZoneDataExchange) GetRrSetsOk() (ret ZoneDataExchangeGetRrSetsRetType, ok bool) { + return getZoneDataExchangeGetRrSetsAttributeTypeOk(o.RrSets) } // HasRrSets returns a boolean if a field has been set. func (o *ZoneDataExchange) HasRrSets() bool { - if o != nil && !IsNil(o.RrSets) { - return true - } - - return false + _, ok := o.GetRrSetsOk() + return ok } // SetRrSets gets a reference to the given []RecordDataExchange and assigns it to the RrSets field. -func (o *ZoneDataExchange) SetRrSets(v *[]RecordDataExchange) { - o.RrSets = v +func (o *ZoneDataExchange) SetRrSets(v ZoneDataExchangeGetRrSetsRetType) { + setZoneDataExchangeGetRrSetsAttributeType(&o.RrSets, v) } func (o ZoneDataExchange) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.RrSets) { - toSerialize["rrSets"] = o.RrSets + if val, ok := getZoneDataExchangeGetRrSetsAttributeTypeOk(o.RrSets); ok { + toSerialize["RrSets"] = val } return toSerialize, nil } diff --git a/services/dns/model_zone_extensions.go b/services/dns/model_zone_extensions.go index 3b3a39c55..bb43fd535 100644 --- a/services/dns/model_zone_extensions.go +++ b/services/dns/model_zone_extensions.go @@ -17,9 +17,29 @@ import ( // checks if the ZoneExtensions type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ZoneExtensions{} +/* + types and functions for observabilityExtension +*/ + +// isModel +type ZoneExtensionsGetObservabilityExtensionAttributeType = *ZoneObservabilityExtension +type ZoneExtensionsGetObservabilityExtensionArgType = ZoneObservabilityExtension +type ZoneExtensionsGetObservabilityExtensionRetType = ZoneObservabilityExtension + +func getZoneExtensionsGetObservabilityExtensionAttributeTypeOk(arg ZoneExtensionsGetObservabilityExtensionAttributeType) (ret ZoneExtensionsGetObservabilityExtensionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setZoneExtensionsGetObservabilityExtensionAttributeType(arg *ZoneExtensionsGetObservabilityExtensionAttributeType, val ZoneExtensionsGetObservabilityExtensionRetType) { + *arg = &val +} + // ZoneExtensions struct for ZoneExtensions type ZoneExtensions struct { - ObservabilityExtension *ZoneObservabilityExtension `json:"observabilityExtension,omitempty"` + ObservabilityExtension ZoneExtensionsGetObservabilityExtensionAttributeType `json:"observabilityExtension,omitempty"` } // NewZoneExtensions instantiates a new ZoneExtensions object @@ -40,41 +60,32 @@ func NewZoneExtensionsWithDefaults() *ZoneExtensions { } // GetObservabilityExtension returns the ObservabilityExtension field value if set, zero value otherwise. -func (o *ZoneExtensions) GetObservabilityExtension() *ZoneObservabilityExtension { - if o == nil || IsNil(o.ObservabilityExtension) { - var ret *ZoneObservabilityExtension - return ret - } - return o.ObservabilityExtension +func (o *ZoneExtensions) GetObservabilityExtension() (res ZoneExtensionsGetObservabilityExtensionRetType) { + res, _ = o.GetObservabilityExtensionOk() + return } // GetObservabilityExtensionOk returns a tuple with the ObservabilityExtension field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ZoneExtensions) GetObservabilityExtensionOk() (*ZoneObservabilityExtension, bool) { - if o == nil || IsNil(o.ObservabilityExtension) { - return nil, false - } - return o.ObservabilityExtension, true +func (o *ZoneExtensions) GetObservabilityExtensionOk() (ret ZoneExtensionsGetObservabilityExtensionRetType, ok bool) { + return getZoneExtensionsGetObservabilityExtensionAttributeTypeOk(o.ObservabilityExtension) } // HasObservabilityExtension returns a boolean if a field has been set. func (o *ZoneExtensions) HasObservabilityExtension() bool { - if o != nil && !IsNil(o.ObservabilityExtension) { - return true - } - - return false + _, ok := o.GetObservabilityExtensionOk() + return ok } // SetObservabilityExtension gets a reference to the given ZoneObservabilityExtension and assigns it to the ObservabilityExtension field. -func (o *ZoneExtensions) SetObservabilityExtension(v *ZoneObservabilityExtension) { - o.ObservabilityExtension = v +func (o *ZoneExtensions) SetObservabilityExtension(v ZoneExtensionsGetObservabilityExtensionRetType) { + setZoneExtensionsGetObservabilityExtensionAttributeType(&o.ObservabilityExtension, v) } func (o ZoneExtensions) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.ObservabilityExtension) { - toSerialize["observabilityExtension"] = o.ObservabilityExtension + if val, ok := getZoneExtensionsGetObservabilityExtensionAttributeTypeOk(o.ObservabilityExtension); ok { + toSerialize["ObservabilityExtension"] = val } return toSerialize, nil } diff --git a/services/dns/model_zone_models_import_record_model.go b/services/dns/model_zone_models_import_record_model.go index 7b068fe7c..4c3c10dea 100644 --- a/services/dns/model_zone_models_import_record_model.go +++ b/services/dns/model_zone_models_import_record_model.go @@ -17,13 +17,117 @@ import ( // checks if the ZoneModelsImportRecordModel type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ZoneModelsImportRecordModel{} +/* + types and functions for comment +*/ + +// isNotNullableString +type ZoneModelsImportRecordModelGetCommentAttributeType = *string + +func getZoneModelsImportRecordModelGetCommentAttributeTypeOk(arg ZoneModelsImportRecordModelGetCommentAttributeType) (ret ZoneModelsImportRecordModelGetCommentRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setZoneModelsImportRecordModelGetCommentAttributeType(arg *ZoneModelsImportRecordModelGetCommentAttributeType, val ZoneModelsImportRecordModelGetCommentRetType) { + *arg = &val +} + +type ZoneModelsImportRecordModelGetCommentArgType = string +type ZoneModelsImportRecordModelGetCommentRetType = string + +/* + types and functions for content +*/ + +// isArray +type ZoneModelsImportRecordModelGetContentAttributeType = *[]string +type ZoneModelsImportRecordModelGetContentArgType = []string +type ZoneModelsImportRecordModelGetContentRetType = []string + +func getZoneModelsImportRecordModelGetContentAttributeTypeOk(arg ZoneModelsImportRecordModelGetContentAttributeType) (ret ZoneModelsImportRecordModelGetContentRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setZoneModelsImportRecordModelGetContentAttributeType(arg *ZoneModelsImportRecordModelGetContentAttributeType, val ZoneModelsImportRecordModelGetContentRetType) { + *arg = &val +} + +/* + types and functions for name +*/ + +// isNotNullableString +type ZoneModelsImportRecordModelGetNameAttributeType = *string + +func getZoneModelsImportRecordModelGetNameAttributeTypeOk(arg ZoneModelsImportRecordModelGetNameAttributeType) (ret ZoneModelsImportRecordModelGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setZoneModelsImportRecordModelGetNameAttributeType(arg *ZoneModelsImportRecordModelGetNameAttributeType, val ZoneModelsImportRecordModelGetNameRetType) { + *arg = &val +} + +type ZoneModelsImportRecordModelGetNameArgType = string +type ZoneModelsImportRecordModelGetNameRetType = string + +/* + types and functions for ttl +*/ + +// isInteger +type ZoneModelsImportRecordModelGetTtlAttributeType = *int64 +type ZoneModelsImportRecordModelGetTtlArgType = int64 +type ZoneModelsImportRecordModelGetTtlRetType = int64 + +func getZoneModelsImportRecordModelGetTtlAttributeTypeOk(arg ZoneModelsImportRecordModelGetTtlAttributeType) (ret ZoneModelsImportRecordModelGetTtlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setZoneModelsImportRecordModelGetTtlAttributeType(arg *ZoneModelsImportRecordModelGetTtlAttributeType, val ZoneModelsImportRecordModelGetTtlRetType) { + *arg = &val +} + +/* + types and functions for type +*/ + +// isNotNullableString +type ZoneModelsImportRecordModelGetTypeAttributeType = *string + +func getZoneModelsImportRecordModelGetTypeAttributeTypeOk(arg ZoneModelsImportRecordModelGetTypeAttributeType) (ret ZoneModelsImportRecordModelGetTypeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setZoneModelsImportRecordModelGetTypeAttributeType(arg *ZoneModelsImportRecordModelGetTypeAttributeType, val ZoneModelsImportRecordModelGetTypeRetType) { + *arg = &val +} + +type ZoneModelsImportRecordModelGetTypeArgType = string +type ZoneModelsImportRecordModelGetTypeRetType = string + // ZoneModelsImportRecordModel struct for ZoneModelsImportRecordModel type ZoneModelsImportRecordModel struct { - Comment *string `json:"comment,omitempty"` - Content *[]string `json:"content,omitempty"` - Name *string `json:"name,omitempty"` - Ttl *int64 `json:"ttl,omitempty"` - Type *string `json:"type,omitempty"` + Comment ZoneModelsImportRecordModelGetCommentAttributeType `json:"comment,omitempty"` + Content ZoneModelsImportRecordModelGetContentAttributeType `json:"content,omitempty"` + Name ZoneModelsImportRecordModelGetNameAttributeType `json:"name,omitempty"` + // Can be cast to int32 without loss of precision. + Ttl ZoneModelsImportRecordModelGetTtlAttributeType `json:"ttl,omitempty"` + Type ZoneModelsImportRecordModelGetTypeAttributeType `json:"type,omitempty"` } // NewZoneModelsImportRecordModel instantiates a new ZoneModelsImportRecordModel object @@ -44,181 +148,136 @@ func NewZoneModelsImportRecordModelWithDefaults() *ZoneModelsImportRecordModel { } // GetComment returns the Comment field value if set, zero value otherwise. -func (o *ZoneModelsImportRecordModel) GetComment() *string { - if o == nil || IsNil(o.Comment) { - var ret *string - return ret - } - return o.Comment +func (o *ZoneModelsImportRecordModel) GetComment() (res ZoneModelsImportRecordModelGetCommentRetType) { + res, _ = o.GetCommentOk() + return } // GetCommentOk returns a tuple with the Comment field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ZoneModelsImportRecordModel) GetCommentOk() (*string, bool) { - if o == nil || IsNil(o.Comment) { - return nil, false - } - return o.Comment, true +func (o *ZoneModelsImportRecordModel) GetCommentOk() (ret ZoneModelsImportRecordModelGetCommentRetType, ok bool) { + return getZoneModelsImportRecordModelGetCommentAttributeTypeOk(o.Comment) } // HasComment returns a boolean if a field has been set. func (o *ZoneModelsImportRecordModel) HasComment() bool { - if o != nil && !IsNil(o.Comment) { - return true - } - - return false + _, ok := o.GetCommentOk() + return ok } // SetComment gets a reference to the given string and assigns it to the Comment field. -func (o *ZoneModelsImportRecordModel) SetComment(v *string) { - o.Comment = v +func (o *ZoneModelsImportRecordModel) SetComment(v ZoneModelsImportRecordModelGetCommentRetType) { + setZoneModelsImportRecordModelGetCommentAttributeType(&o.Comment, v) } // GetContent returns the Content field value if set, zero value otherwise. -func (o *ZoneModelsImportRecordModel) GetContent() *[]string { - if o == nil || IsNil(o.Content) { - var ret *[]string - return ret - } - return o.Content +func (o *ZoneModelsImportRecordModel) GetContent() (res ZoneModelsImportRecordModelGetContentRetType) { + res, _ = o.GetContentOk() + return } // GetContentOk returns a tuple with the Content field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ZoneModelsImportRecordModel) GetContentOk() (*[]string, bool) { - if o == nil || IsNil(o.Content) { - return nil, false - } - return o.Content, true +func (o *ZoneModelsImportRecordModel) GetContentOk() (ret ZoneModelsImportRecordModelGetContentRetType, ok bool) { + return getZoneModelsImportRecordModelGetContentAttributeTypeOk(o.Content) } // HasContent returns a boolean if a field has been set. func (o *ZoneModelsImportRecordModel) HasContent() bool { - if o != nil && !IsNil(o.Content) { - return true - } - - return false + _, ok := o.GetContentOk() + return ok } // SetContent gets a reference to the given []string and assigns it to the Content field. -func (o *ZoneModelsImportRecordModel) SetContent(v *[]string) { - o.Content = v +func (o *ZoneModelsImportRecordModel) SetContent(v ZoneModelsImportRecordModelGetContentRetType) { + setZoneModelsImportRecordModelGetContentAttributeType(&o.Content, v) } // GetName returns the Name field value if set, zero value otherwise. -func (o *ZoneModelsImportRecordModel) GetName() *string { - if o == nil || IsNil(o.Name) { - var ret *string - return ret - } - return o.Name +func (o *ZoneModelsImportRecordModel) GetName() (res ZoneModelsImportRecordModelGetNameRetType) { + res, _ = o.GetNameOk() + return } // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ZoneModelsImportRecordModel) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true +func (o *ZoneModelsImportRecordModel) GetNameOk() (ret ZoneModelsImportRecordModelGetNameRetType, ok bool) { + return getZoneModelsImportRecordModelGetNameAttributeTypeOk(o.Name) } // HasName returns a boolean if a field has been set. func (o *ZoneModelsImportRecordModel) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false + _, ok := o.GetNameOk() + return ok } // SetName gets a reference to the given string and assigns it to the Name field. -func (o *ZoneModelsImportRecordModel) SetName(v *string) { - o.Name = v +func (o *ZoneModelsImportRecordModel) SetName(v ZoneModelsImportRecordModelGetNameRetType) { + setZoneModelsImportRecordModelGetNameAttributeType(&o.Name, v) } // GetTtl returns the Ttl field value if set, zero value otherwise. -func (o *ZoneModelsImportRecordModel) GetTtl() *int64 { - if o == nil || IsNil(o.Ttl) { - var ret *int64 - return ret - } - return o.Ttl +func (o *ZoneModelsImportRecordModel) GetTtl() (res ZoneModelsImportRecordModelGetTtlRetType) { + res, _ = o.GetTtlOk() + return } // GetTtlOk returns a tuple with the Ttl field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ZoneModelsImportRecordModel) GetTtlOk() (*int64, bool) { - if o == nil || IsNil(o.Ttl) { - return nil, false - } - return o.Ttl, true +func (o *ZoneModelsImportRecordModel) GetTtlOk() (ret ZoneModelsImportRecordModelGetTtlRetType, ok bool) { + return getZoneModelsImportRecordModelGetTtlAttributeTypeOk(o.Ttl) } // HasTtl returns a boolean if a field has been set. func (o *ZoneModelsImportRecordModel) HasTtl() bool { - if o != nil && !IsNil(o.Ttl) { - return true - } - - return false + _, ok := o.GetTtlOk() + return ok } // SetTtl gets a reference to the given int64 and assigns it to the Ttl field. -func (o *ZoneModelsImportRecordModel) SetTtl(v *int64) { - o.Ttl = v +func (o *ZoneModelsImportRecordModel) SetTtl(v ZoneModelsImportRecordModelGetTtlRetType) { + setZoneModelsImportRecordModelGetTtlAttributeType(&o.Ttl, v) } // GetType returns the Type field value if set, zero value otherwise. -func (o *ZoneModelsImportRecordModel) GetType() *string { - if o == nil || IsNil(o.Type) { - var ret *string - return ret - } - return o.Type +func (o *ZoneModelsImportRecordModel) GetType() (res ZoneModelsImportRecordModelGetTypeRetType) { + res, _ = o.GetTypeOk() + return } // GetTypeOk returns a tuple with the Type field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ZoneModelsImportRecordModel) GetTypeOk() (*string, bool) { - if o == nil || IsNil(o.Type) { - return nil, false - } - return o.Type, true +func (o *ZoneModelsImportRecordModel) GetTypeOk() (ret ZoneModelsImportRecordModelGetTypeRetType, ok bool) { + return getZoneModelsImportRecordModelGetTypeAttributeTypeOk(o.Type) } // HasType returns a boolean if a field has been set. func (o *ZoneModelsImportRecordModel) HasType() bool { - if o != nil && !IsNil(o.Type) { - return true - } - - return false + _, ok := o.GetTypeOk() + return ok } // SetType gets a reference to the given string and assigns it to the Type field. -func (o *ZoneModelsImportRecordModel) SetType(v *string) { - o.Type = v +func (o *ZoneModelsImportRecordModel) SetType(v ZoneModelsImportRecordModelGetTypeRetType) { + setZoneModelsImportRecordModelGetTypeAttributeType(&o.Type, v) } func (o ZoneModelsImportRecordModel) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Comment) { - toSerialize["comment"] = o.Comment + if val, ok := getZoneModelsImportRecordModelGetCommentAttributeTypeOk(o.Comment); ok { + toSerialize["Comment"] = val } - if !IsNil(o.Content) { - toSerialize["content"] = o.Content + if val, ok := getZoneModelsImportRecordModelGetContentAttributeTypeOk(o.Content); ok { + toSerialize["Content"] = val } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name + if val, ok := getZoneModelsImportRecordModelGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val } - if !IsNil(o.Ttl) { - toSerialize["ttl"] = o.Ttl + if val, ok := getZoneModelsImportRecordModelGetTtlAttributeTypeOk(o.Ttl); ok { + toSerialize["Ttl"] = val } - if !IsNil(o.Type) { - toSerialize["type"] = o.Type + if val, ok := getZoneModelsImportRecordModelGetTypeAttributeTypeOk(o.Type); ok { + toSerialize["Type"] = val } return toSerialize, nil } diff --git a/services/dns/model_zone_models_import_zone_json.go b/services/dns/model_zone_models_import_zone_json.go index b3c61c1d3..4f6f78ab5 100644 --- a/services/dns/model_zone_models_import_zone_json.go +++ b/services/dns/model_zone_models_import_zone_json.go @@ -17,9 +17,29 @@ import ( // checks if the ZoneModelsImportZoneJson type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ZoneModelsImportZoneJson{} +/* + types and functions for rrSets +*/ + +// isArray +type ZoneModelsImportZoneJsonGetRrSetsAttributeType = *[]ZoneModelsImportRecordModel +type ZoneModelsImportZoneJsonGetRrSetsArgType = []ZoneModelsImportRecordModel +type ZoneModelsImportZoneJsonGetRrSetsRetType = []ZoneModelsImportRecordModel + +func getZoneModelsImportZoneJsonGetRrSetsAttributeTypeOk(arg ZoneModelsImportZoneJsonGetRrSetsAttributeType) (ret ZoneModelsImportZoneJsonGetRrSetsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setZoneModelsImportZoneJsonGetRrSetsAttributeType(arg *ZoneModelsImportZoneJsonGetRrSetsAttributeType, val ZoneModelsImportZoneJsonGetRrSetsRetType) { + *arg = &val +} + // ZoneModelsImportZoneJson struct for ZoneModelsImportZoneJson type ZoneModelsImportZoneJson struct { - RrSets *[]ZoneModelsImportRecordModel `json:"rrSets,omitempty"` + RrSets ZoneModelsImportZoneJsonGetRrSetsAttributeType `json:"rrSets,omitempty"` } // NewZoneModelsImportZoneJson instantiates a new ZoneModelsImportZoneJson object @@ -40,41 +60,32 @@ func NewZoneModelsImportZoneJsonWithDefaults() *ZoneModelsImportZoneJson { } // GetRrSets returns the RrSets field value if set, zero value otherwise. -func (o *ZoneModelsImportZoneJson) GetRrSets() *[]ZoneModelsImportRecordModel { - if o == nil || IsNil(o.RrSets) { - var ret *[]ZoneModelsImportRecordModel - return ret - } - return o.RrSets +func (o *ZoneModelsImportZoneJson) GetRrSets() (res ZoneModelsImportZoneJsonGetRrSetsRetType) { + res, _ = o.GetRrSetsOk() + return } // GetRrSetsOk returns a tuple with the RrSets field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ZoneModelsImportZoneJson) GetRrSetsOk() (*[]ZoneModelsImportRecordModel, bool) { - if o == nil || IsNil(o.RrSets) { - return nil, false - } - return o.RrSets, true +func (o *ZoneModelsImportZoneJson) GetRrSetsOk() (ret ZoneModelsImportZoneJsonGetRrSetsRetType, ok bool) { + return getZoneModelsImportZoneJsonGetRrSetsAttributeTypeOk(o.RrSets) } // HasRrSets returns a boolean if a field has been set. func (o *ZoneModelsImportZoneJson) HasRrSets() bool { - if o != nil && !IsNil(o.RrSets) { - return true - } - - return false + _, ok := o.GetRrSetsOk() + return ok } // SetRrSets gets a reference to the given []ZoneModelsImportRecordModel and assigns it to the RrSets field. -func (o *ZoneModelsImportZoneJson) SetRrSets(v *[]ZoneModelsImportRecordModel) { - o.RrSets = v +func (o *ZoneModelsImportZoneJson) SetRrSets(v ZoneModelsImportZoneJsonGetRrSetsRetType) { + setZoneModelsImportZoneJsonGetRrSetsAttributeType(&o.RrSets, v) } func (o ZoneModelsImportZoneJson) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.RrSets) { - toSerialize["rrSets"] = o.RrSets + if val, ok := getZoneModelsImportZoneJsonGetRrSetsAttributeTypeOk(o.RrSets); ok { + toSerialize["RrSets"] = val } return toSerialize, nil } diff --git a/services/dns/model_zone_observability_extension.go b/services/dns/model_zone_observability_extension.go index 201d3d0bf..9861f6073 100644 --- a/services/dns/model_zone_observability_extension.go +++ b/services/dns/model_zone_observability_extension.go @@ -17,11 +17,53 @@ import ( // checks if the ZoneObservabilityExtension type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ZoneObservabilityExtension{} +/* + types and functions for observabilityInstanceId +*/ + +// isNotNullableString +type ZoneObservabilityExtensionGetObservabilityInstanceIdAttributeType = *string + +func getZoneObservabilityExtensionGetObservabilityInstanceIdAttributeTypeOk(arg ZoneObservabilityExtensionGetObservabilityInstanceIdAttributeType) (ret ZoneObservabilityExtensionGetObservabilityInstanceIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setZoneObservabilityExtensionGetObservabilityInstanceIdAttributeType(arg *ZoneObservabilityExtensionGetObservabilityInstanceIdAttributeType, val ZoneObservabilityExtensionGetObservabilityInstanceIdRetType) { + *arg = &val +} + +type ZoneObservabilityExtensionGetObservabilityInstanceIdArgType = string +type ZoneObservabilityExtensionGetObservabilityInstanceIdRetType = string + +/* + types and functions for state +*/ + +// isNotNullableString +type ZoneObservabilityExtensionGetStateAttributeType = *string + +func getZoneObservabilityExtensionGetStateAttributeTypeOk(arg ZoneObservabilityExtensionGetStateAttributeType) (ret ZoneObservabilityExtensionGetStateRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setZoneObservabilityExtensionGetStateAttributeType(arg *ZoneObservabilityExtensionGetStateAttributeType, val ZoneObservabilityExtensionGetStateRetType) { + *arg = &val +} + +type ZoneObservabilityExtensionGetStateArgType = string +type ZoneObservabilityExtensionGetStateRetType = string + // ZoneObservabilityExtension struct for ZoneObservabilityExtension type ZoneObservabilityExtension struct { // REQUIRED - ObservabilityInstanceId *string `json:"observabilityInstanceId"` - State *string `json:"state,omitempty"` + ObservabilityInstanceId ZoneObservabilityExtensionGetObservabilityInstanceIdAttributeType `json:"observabilityInstanceId"` + State ZoneObservabilityExtensionGetStateAttributeType `json:"state,omitempty"` } type _ZoneObservabilityExtension ZoneObservabilityExtension @@ -30,9 +72,9 @@ type _ZoneObservabilityExtension ZoneObservabilityExtension // 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 NewZoneObservabilityExtension(observabilityInstanceId *string) *ZoneObservabilityExtension { +func NewZoneObservabilityExtension(observabilityInstanceId ZoneObservabilityExtensionGetObservabilityInstanceIdArgType) *ZoneObservabilityExtension { this := ZoneObservabilityExtension{} - this.ObservabilityInstanceId = observabilityInstanceId + setZoneObservabilityExtensionGetObservabilityInstanceIdAttributeType(&this.ObservabilityInstanceId, observabilityInstanceId) return &this } @@ -45,66 +87,52 @@ func NewZoneObservabilityExtensionWithDefaults() *ZoneObservabilityExtension { } // GetObservabilityInstanceId returns the ObservabilityInstanceId field value -func (o *ZoneObservabilityExtension) GetObservabilityInstanceId() *string { - if o == nil || IsNil(o.ObservabilityInstanceId) { - var ret *string - return ret - } - - return o.ObservabilityInstanceId +func (o *ZoneObservabilityExtension) GetObservabilityInstanceId() (ret ZoneObservabilityExtensionGetObservabilityInstanceIdRetType) { + ret, _ = o.GetObservabilityInstanceIdOk() + return ret } // GetObservabilityInstanceIdOk returns a tuple with the ObservabilityInstanceId field value // and a boolean to check if the value has been set. -func (o *ZoneObservabilityExtension) GetObservabilityInstanceIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.ObservabilityInstanceId, true +func (o *ZoneObservabilityExtension) GetObservabilityInstanceIdOk() (ret ZoneObservabilityExtensionGetObservabilityInstanceIdRetType, ok bool) { + return getZoneObservabilityExtensionGetObservabilityInstanceIdAttributeTypeOk(o.ObservabilityInstanceId) } // SetObservabilityInstanceId sets field value -func (o *ZoneObservabilityExtension) SetObservabilityInstanceId(v *string) { - o.ObservabilityInstanceId = v +func (o *ZoneObservabilityExtension) SetObservabilityInstanceId(v ZoneObservabilityExtensionGetObservabilityInstanceIdRetType) { + setZoneObservabilityExtensionGetObservabilityInstanceIdAttributeType(&o.ObservabilityInstanceId, v) } // GetState returns the State field value if set, zero value otherwise. -func (o *ZoneObservabilityExtension) GetState() *string { - if o == nil || IsNil(o.State) { - var ret *string - return ret - } - return o.State +func (o *ZoneObservabilityExtension) GetState() (res ZoneObservabilityExtensionGetStateRetType) { + res, _ = o.GetStateOk() + return } // GetStateOk returns a tuple with the State field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ZoneObservabilityExtension) GetStateOk() (*string, bool) { - if o == nil || IsNil(o.State) { - return nil, false - } - return o.State, true +func (o *ZoneObservabilityExtension) GetStateOk() (ret ZoneObservabilityExtensionGetStateRetType, ok bool) { + return getZoneObservabilityExtensionGetStateAttributeTypeOk(o.State) } // HasState returns a boolean if a field has been set. func (o *ZoneObservabilityExtension) HasState() bool { - if o != nil && !IsNil(o.State) { - return true - } - - return false + _, ok := o.GetStateOk() + return ok } // SetState gets a reference to the given string and assigns it to the State field. -func (o *ZoneObservabilityExtension) SetState(v *string) { - o.State = v +func (o *ZoneObservabilityExtension) SetState(v ZoneObservabilityExtensionGetStateRetType) { + setZoneObservabilityExtensionGetStateAttributeType(&o.State, v) } func (o ZoneObservabilityExtension) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["observabilityInstanceId"] = o.ObservabilityInstanceId - if !IsNil(o.State) { - toSerialize["state"] = o.State + if val, ok := getZoneObservabilityExtensionGetObservabilityInstanceIdAttributeTypeOk(o.ObservabilityInstanceId); ok { + toSerialize["ObservabilityInstanceId"] = val + } + if val, ok := getZoneObservabilityExtensionGetStateAttributeTypeOk(o.State); ok { + toSerialize["State"] = val } return toSerialize, nil } diff --git a/services/dns/model_zone_response.go b/services/dns/model_zone_response.go index 117b75a1f..6d4c8a40f 100644 --- a/services/dns/model_zone_response.go +++ b/services/dns/model_zone_response.go @@ -17,11 +17,52 @@ import ( // checks if the ZoneResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ZoneResponse{} +/* + types and functions for message +*/ + +// isNotNullableString +type ZoneResponseGetMessageAttributeType = *string + +func getZoneResponseGetMessageAttributeTypeOk(arg ZoneResponseGetMessageAttributeType) (ret ZoneResponseGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setZoneResponseGetMessageAttributeType(arg *ZoneResponseGetMessageAttributeType, val ZoneResponseGetMessageRetType) { + *arg = &val +} + +type ZoneResponseGetMessageArgType = string +type ZoneResponseGetMessageRetType = string + +/* + types and functions for zone +*/ + +// isModel +type ZoneResponseGetZoneAttributeType = *Zone +type ZoneResponseGetZoneArgType = Zone +type ZoneResponseGetZoneRetType = Zone + +func getZoneResponseGetZoneAttributeTypeOk(arg ZoneResponseGetZoneAttributeType) (ret ZoneResponseGetZoneRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setZoneResponseGetZoneAttributeType(arg *ZoneResponseGetZoneAttributeType, val ZoneResponseGetZoneRetType) { + *arg = &val +} + // ZoneResponse ResponseZone for user info. type ZoneResponse struct { - Message *string `json:"message,omitempty"` + Message ZoneResponseGetMessageAttributeType `json:"message,omitempty"` // REQUIRED - Zone *Zone `json:"zone"` + Zone ZoneResponseGetZoneAttributeType `json:"zone"` } type _ZoneResponse ZoneResponse @@ -30,9 +71,9 @@ type _ZoneResponse ZoneResponse // 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 NewZoneResponse(zone *Zone) *ZoneResponse { +func NewZoneResponse(zone ZoneResponseGetZoneArgType) *ZoneResponse { this := ZoneResponse{} - this.Zone = zone + setZoneResponseGetZoneAttributeType(&this.Zone, zone) return &this } @@ -45,67 +86,53 @@ func NewZoneResponseWithDefaults() *ZoneResponse { } // GetMessage returns the Message field value if set, zero value otherwise. -func (o *ZoneResponse) GetMessage() *string { - if o == nil || IsNil(o.Message) { - var ret *string - return ret - } - return o.Message +func (o *ZoneResponse) GetMessage() (res ZoneResponseGetMessageRetType) { + res, _ = o.GetMessageOk() + return } // GetMessageOk returns a tuple with the Message field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ZoneResponse) GetMessageOk() (*string, bool) { - if o == nil || IsNil(o.Message) { - return nil, false - } - return o.Message, true +func (o *ZoneResponse) GetMessageOk() (ret ZoneResponseGetMessageRetType, ok bool) { + return getZoneResponseGetMessageAttributeTypeOk(o.Message) } // HasMessage returns a boolean if a field has been set. func (o *ZoneResponse) HasMessage() bool { - if o != nil && !IsNil(o.Message) { - return true - } - - return false + _, ok := o.GetMessageOk() + return ok } // SetMessage gets a reference to the given string and assigns it to the Message field. -func (o *ZoneResponse) SetMessage(v *string) { - o.Message = v +func (o *ZoneResponse) SetMessage(v ZoneResponseGetMessageRetType) { + setZoneResponseGetMessageAttributeType(&o.Message, v) } // GetZone returns the Zone field value -func (o *ZoneResponse) GetZone() *Zone { - if o == nil || IsNil(o.Zone) { - var ret *Zone - return ret - } - - return o.Zone +func (o *ZoneResponse) GetZone() (ret ZoneResponseGetZoneRetType) { + ret, _ = o.GetZoneOk() + return ret } // GetZoneOk returns a tuple with the Zone field value // and a boolean to check if the value has been set. -func (o *ZoneResponse) GetZoneOk() (*Zone, bool) { - if o == nil { - return nil, false - } - return o.Zone, true +func (o *ZoneResponse) GetZoneOk() (ret ZoneResponseGetZoneRetType, ok bool) { + return getZoneResponseGetZoneAttributeTypeOk(o.Zone) } // SetZone sets field value -func (o *ZoneResponse) SetZone(v *Zone) { - o.Zone = v +func (o *ZoneResponse) SetZone(v ZoneResponseGetZoneRetType) { + setZoneResponseGetZoneAttributeType(&o.Zone, v) } func (o ZoneResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Message) { - toSerialize["message"] = o.Message + if val, ok := getZoneResponseGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val + } + if val, ok := getZoneResponseGetZoneAttributeTypeOk(o.Zone); ok { + toSerialize["Zone"] = val } - toSerialize["zone"] = o.Zone return toSerialize, nil } diff --git a/services/dns/utils.go b/services/dns/utils.go index 070388ef7..51414e209 100644 --- a/services/dns/utils.go +++ b/services/dns/utils.go @@ -40,6 +40,29 @@ func PtrString(v string) *string { return &v } // PtrTime is helper routine that returns a pointer to given Time value. func PtrTime(v time.Time) *time.Time { return &v } +type NullableValue[T any] struct { + value *T + isSet bool +} + +func (v NullableValue[T]) Get() *T { + return v.value +} + +func (v *NullableValue[T]) Set(val *T) { + v.value = val + v.isSet = true +} + +func (v NullableValue[T]) IsSet() bool { + return v.isSet +} + +func (v *NullableValue[T]) Unset() { + v.value = nil + v.isSet = false +} + type NullableBool struct { value *bool isSet bool @@ -333,6 +356,9 @@ func IsNil(i interface{}) bool { if i == nil { return true } + if t, ok := i.(interface{ IsSet() bool }); ok { + return !t.IsSet() + } switch reflect.TypeOf(i).Kind() { case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: return reflect.ValueOf(i).IsNil()