github.com/cloudwan/edgelq-sdk@v1.15.4/limits/proto/v1alpha2/plan_assignment_service.proto (about)

     1  syntax = "proto3";
     2  
     3  package ntt.limits.v1alpha2;
     4  
     5  import "edgelq-sdk/limits/proto/v1alpha2/plan_assignment.proto";
     6  import "edgelq-sdk/limits/proto/v1alpha2/plan_assignment_change.proto";
     7  import "edgelq-sdk/limits/proto/v1alpha2/plan_assignment_custom.proto";
     8  import "google/api/annotations.proto";
     9  import "google/api/client.proto";
    10  import "google/protobuf/empty.proto";
    11  import "google/protobuf/field_mask.proto";
    12  import "google/protobuf/timestamp.proto";
    13  import "goten-sdk/types/view.proto";
    14  import "goten-sdk/types/watch_type.proto";
    15  
    16  option go_package = "github.com/cloudwan/edgelq-sdk/limits/client/v1alpha2/plan_assignment;plan_assignment_client";
    17  option java_multiple_files = false;
    18  option java_outer_classname = "PlanAssignmentServiceProto";
    19  option java_package = "com.ntt.limits.pb.v1alpha2";
    20  
    21  // A request message of the GetPlanAssignment method.
    22  message GetPlanAssignmentRequest {
    23    // Name of ntt.limits.v1alpha2.PlanAssignment
    24    string name = 1;
    25  
    26    // A list of extra fields to be obtained for each response item on top of
    27    // fields defined by request field view
    28    google.protobuf.FieldMask field_mask = 3;
    29  
    30    // View defines list of standard response fields present in response items.
    31    // Additional fields can be amended by request field field_mask
    32    goten.types.View view = 4;
    33  }
    34  
    35  // A request message of the BatchGetPlanAssignments method.
    36  message BatchGetPlanAssignmentsRequest {
    37    // Names of PlanAssignments
    38    repeated string names = 2;
    39  
    40    // A list of extra fields to be obtained for each response item on top of
    41    // fields defined by request field view
    42    google.protobuf.FieldMask field_mask = 3;
    43  
    44    // View defines list of standard response fields present in response items.
    45    // Additional fields can be amended by request field field_mask
    46    goten.types.View view = 4;
    47  
    48    reserved 1;
    49  }
    50  
    51  // A response message of the BatchGetPlanAssignments method.
    52  message BatchGetPlanAssignmentsResponse {
    53    // found PlanAssignments
    54    repeated PlanAssignment plan_assignments = 1;
    55  
    56    // list of not found PlanAssignments
    57    repeated string missing = 2;
    58  }
    59  
    60  // A request message of the ListPlanAssignments method.
    61  message ListPlanAssignmentsRequest {
    62    // Parent name of ntt.limits.v1alpha2.PlanAssignment
    63    string parent = 1;
    64  
    65    // Requested page size. Server may return fewer PlanAssignments than
    66    // requested. If unspecified, server will pick an appropriate default.
    67    int32 page_size = 2;
    68  
    69    // A token identifying a page of results the server should return.
    70    // Typically, this is the value of
    71    // ListPlanAssignmentsResponse.next_page_token.
    72    string page_token = 3;
    73  
    74    // Order By -
    75    // https://cloud.google.com/apis/design/design_patterns#list_pagination list
    76    // of field path with order directive, either 'asc' or 'desc'. If direction is
    77    // not provided, 'asc' is assumed. e.g. "state.nested_field asc,
    78    // state.something.else desc, theme"
    79    string order_by = 4;
    80  
    81    // Filter - filter results by field criteria. Simplified SQL-like syntax with
    82    // following operators:
    83    // <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS
    84    // [NOT] NULL | NaN . Combine conditions with OR | AND example: 'meta.labels
    85    // CONTAINS "severity:important" OR (state.last_error_time >
    86    // "2018-11-15T10:00:00Z" AND state.status = "ERROR")'
    87    string filter = 5;
    88  
    89    // A list of extra fields to be obtained for each response item on top of
    90    // fields defined by request field view
    91    google.protobuf.FieldMask field_mask = 6;
    92  
    93    // View defines list of standard response fields present in response items.
    94    // Additional fields can be amended by request field field_mask
    95    goten.types.View view = 7;
    96  
    97    // Indicates if list response should contain total count and offset (fields
    98    // current_offset and total_results_count).
    99    bool include_paging_info = 8;
   100  }
   101  
   102  // A response message of the ListPlanAssignments method.
   103  message ListPlanAssignmentsResponse {
   104    // The list of PlanAssignments
   105    repeated PlanAssignment plan_assignments = 1;
   106  
   107    // A token to retrieve previous page of results.
   108    //
   109    // Pass this value in the ListPlanAssignmentsRequest.page_token.
   110    string prev_page_token = 3;
   111  
   112    // A token to retrieve next page of results.
   113    //
   114    // Pass this value in the ListPlanAssignmentsRequest.page_token.
   115    string next_page_token = 4;
   116  
   117    // Current offset from the first page or 0 if no page tokens were given,
   118    // paging info was not requested or there was an error while trying to get
   119    // it). Page index can be computed from offset and limit provided in a
   120    // request.
   121    int32 current_offset = 5;
   122  
   123    // Number of total PlanAssignments across all pages or 0, if there are no
   124    // items, paging info was not requested or there was an error while trying to
   125    // get it.
   126    int32 total_results_count = 6;
   127  }
   128  
   129  // A request message of the WatchPlanAssignment method.
   130  message WatchPlanAssignmentRequest {
   131    // Name of ntt.limits.v1alpha2.PlanAssignment
   132    string name = 1;
   133  
   134    // A list of extra fields to be obtained for each response item on top of
   135    // fields defined by request field view
   136    google.protobuf.FieldMask field_mask = 2;
   137  
   138    // View defines list of standard response fields present in response items.
   139    // Additional fields can be amended by request field field_mask
   140    goten.types.View view = 4;
   141  }
   142  
   143  // A response message of the WatchPlanAssignment method.
   144  message WatchPlanAssignmentResponse { PlanAssignmentChange change = 1; }
   145  
   146  // A request message of the WatchPlanAssignments method.
   147  message WatchPlanAssignmentsRequest {
   148    // Type of a watch. Identifies how server stream data to a client, which
   149    // fields in a request are allowed and which fields in response are relevant.
   150    goten.types.WatchType type = 9;
   151  
   152    // Parent name of ntt.limits.v1alpha2.PlanAssignment
   153    string parent = 1;
   154  
   155    // Requested page size. Server may return fewer PlanAssignments than
   156    // requested. If unspecified, server will pick an appropriate default. Can be
   157    // populated only for stateful watch type.
   158    int32 page_size = 2;
   159  
   160    // A token identifying a page of results the server should return.
   161    // Can be populated only for stateful watch type.
   162    string page_token = 3;
   163  
   164    // Order By -
   165    // https://cloud.google.com/apis/design/design_patterns#list_pagination Can be
   166    // populated only for stateful watch type.
   167    string order_by = 4;
   168  
   169    // A token identifying watch resume point from previous session.
   170    // Can be populated only for stateless watch type.
   171    string resume_token = 10;
   172  
   173    // Point in the time from which we want to start getting updates. This field
   174    // can be populated only for stateless watch type and if resume token is not
   175    // known yet. If specified, initial snapshot will NOT be provided. It is
   176    // assumed client can obtain it using separate means. Watch responses will
   177    // contain resume tokens which should be used to resume broken connection.
   178    google.protobuf.Timestamp starting_time = 12;
   179  
   180    // Filter - filter results by field criteria. Simplified SQL-like syntax with
   181    // following operators:
   182    // <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS
   183    // [NOT] NULL | NaN . Combine conditions with OR | AND example: 'meta.labels
   184    // CONTAINS "severity:important" OR (state.last_error_time >
   185    // "2018-11-15T10:00:00Z" AND state.status = "ERROR")'
   186    string filter = 5;
   187  
   188    // A list of extra fields to be obtained for each response item on top of
   189    // fields defined by request field view Changes to PlanAssignment that don't
   190    // affect any of masked fields won't be sent back.
   191    google.protobuf.FieldMask field_mask = 6;
   192  
   193    // View defines list of standard response fields present in response items.
   194    // Additional fields can be amended by request field field_mask Changes to
   195    // PlanAssignment that don't affect any of masked fields won't be sent back.
   196    goten.types.View view = 8;
   197  
   198    // Maximum amount of changes in each response message. Query result response
   199    // is divided on the server side into chunks with size of a specified amount
   200    // to limit memory footprint of each message. Responses will hold information
   201    // whether more elements will continue for the actual change. If unspecified,
   202    // server will pick an appropriate default.
   203    int32 max_chunk_size = 11;
   204  }
   205  
   206  // A response message of the WatchPlanAssignments method.
   207  message WatchPlanAssignmentsResponse {
   208    // Changes of PlanAssignments
   209    repeated PlanAssignmentChange plan_assignment_changes = 2;
   210  
   211    // If request specified max_chunk_size (or this limit was enforced if
   212    // stateless watch has been chosen), then responses with "full changeset" will
   213    // be divided into chunks. Client should keep receiving messages and, once
   214    // is_current has value true, combine this recent message with all previous
   215    // ones where is_current is false. If this is the first is_current in a whole
   216    // watch stream, then it means that client should have, at this moment,
   217    // contain snapshot of the current situation (or more accurately, snapshot of
   218    // situation at the moment of request). All PlanAssignments will be of type
   219    // Added/Current (depending on watch_type specified in the request). Further
   220    // responses will be incremental - however messages may still be chunked and
   221    // is_current logic still applies. is_current is always true for stateful
   222    // watch if max_chunk_size was left to 0.
   223    bool is_current = 4;
   224  
   225    // When present, PageTokens used for page navigation should be updated.
   226    // Present only if is_current is true (last chunk).
   227    PageTokenChange page_token_change = 3;
   228  
   229    // Token that can be used if current connection drops and client needs to
   230    // reconnect. Populated only for stateless watch type. Present only if
   231    // is_current is true (last chunk).
   232    string resume_token = 5;
   233  
   234    // Server may occasionally send information how many resources should client
   235    // have in its state so far (response message without any changes, but with
   236    // snapshot_size field specified). If client has different value than the one
   237    // sent by the server, then it should be treated by a client as an error and
   238    // should reconnect. If value is smaller then 0, then client should ignore
   239    // this field as unpopulated. This field should be checked only for stateless
   240    // watch. In stateful those kind of errors are handled by the server side.
   241    // Will be never sent together with is_current, is_soft_reset and
   242    // is_hard_reset flags.
   243    int64 snapshot_size = 6;
   244  
   245    // In case of internal issue server may send response message with this flag.
   246    // It indicates that client should drop all changes from recent responses
   247    // where is_current is false only! If last message had is_current set to true,
   248    // client should do nothing and process normally. Resume token received before
   249    // is still valid. This field should be checked only for stateless watch. In
   250    // stateful those kind of errors are handled by the server side. Will never be
   251    // sent along with is_current, is_hard_reset or snapshot_size.
   252    bool is_soft_reset = 7;
   253  
   254    // In case of internal issue server may send response message with this flag.
   255    // After receiving, client should clear whole state (drop all changes received
   256    // so far) as server will send new snapshot (PlanAssignments will contains
   257    // changes of type Current only). Any resume tokens should be discarded as
   258    // well. This field should be checked only for stateless watch. In stateful
   259    // those kind of errors are handled by the server side. Will never be sent
   260    // along with is_current, is_soft_reset or snapshot_size.
   261    bool is_hard_reset = 8;
   262  
   263    message PageTokenChange {
   264      // New token to retrieve previous page of results.
   265      string prev_page_token = 1;
   266  
   267      // New token to retrieve next page of results.
   268      string next_page_token = 2;
   269    }
   270  }
   271  
   272  // A request message of the CreatePlanAssignment method.
   273  message CreatePlanAssignmentRequest {
   274    // Parent name of ntt.limits.v1alpha2.PlanAssignment
   275    string parent = 1;
   276  
   277    // PlanAssignment resource body
   278    PlanAssignment plan_assignment = 2;
   279  
   280    // Optional masking applied to response object to reduce message response
   281    // size.
   282    ResponseMask response_mask = 3;
   283  
   284    // ResponseMask allows client to reduce response message size.
   285    message ResponseMask {
   286      oneof masking {
   287        // If this flag has value true, then response will contain just empty
   288        // resource without any fields populated.
   289        bool skip_entire_response_body = 1;
   290  
   291        // If this field is populated, then resource in response will contain only
   292        // specific fields.
   293        google.protobuf.FieldMask body_mask = 2;
   294      }
   295    }
   296  }
   297  
   298  // A request message of the UpdatePlanAssignment method.
   299  message UpdatePlanAssignmentRequest {
   300    // PlanAssignment resource body
   301    PlanAssignment plan_assignment = 2;
   302  
   303    // FieldMask applied to request - change will be applied only for fields in
   304    // the mask
   305    google.protobuf.FieldMask update_mask = 3;
   306  
   307    // Conditional update applied to request if update should be executed only for
   308    // specific resource state. If this field is populated, then server will fetch
   309    // existing resource, compare with the one stored in the cas field (after
   310    // applying field mask) and proceed with update only and only if they match.
   311    // Otherwise RPC error Aborted will be returned.
   312    CAS cas = 4;
   313  
   314    // If set to true, and the resource is not found,
   315    // a new resource will be created.  In this situation,
   316    // 'field_mask' is ignored.
   317    //
   318    // https://google.aip.dev/134#create-or-update
   319    bool allow_missing = 5; // Optional masking applied to response object to
   320  
   321    // reduce message response size.
   322    ResponseMask response_mask = 6;
   323  
   324    // CAS - Compare and Swap. This object is used if user wants to make update
   325    // conditional based upon previous resource version.
   326    message CAS {
   327      // Conditional desired state of a resource before update.
   328      PlanAssignment conditional_state = 1;
   329  
   330      // Field paths from conditional state of resource server should check and
   331      // compare.
   332      google.protobuf.FieldMask field_mask = 2;
   333    }
   334  
   335    // ResponseMask allows client to reduce response message size.
   336    message ResponseMask {
   337      oneof masking {
   338        // If this flag has value true, then response will contain just empty
   339        // resource without any fields populated. Field body_mask is ignored if
   340        // set.
   341        bool skip_entire_response_body = 1;
   342  
   343        // Include all fields that were actually updated during processing. Note
   344        // this may be larger than update mask if some fields were computed
   345        // additionally. Name is added as well.
   346        bool updated_fields_only = 2;
   347  
   348        // If this field is populated, then resource in response will contain only
   349        // specific fields. If skip_entire_response_body is true, this field is
   350        // ignored.
   351        google.protobuf.FieldMask body_mask = 3;
   352      }
   353    }
   354  }
   355  
   356  // A request message of the DeletePlanAssignment method.
   357  message DeletePlanAssignmentRequest {
   358    // Name of ntt.limits.v1alpha2.PlanAssignment
   359    string name = 1;
   360  
   361    // If set to true, and the resource is not found, method will be successful
   362    // and will not return NotFound error.
   363    bool allow_missing = 2;
   364  }
   365  
   366  // PlanAssignment service API for Limits
   367  service PlanAssignmentService {
   368    option (google.api.default_host) = "limits.edgelq.com";
   369    option (google.api.oauth_scopes) = "https://apis.edgelq.com";
   370  
   371    // GetPlanAssignment
   372    rpc GetPlanAssignment(GetPlanAssignmentRequest) returns (PlanAssignment) {
   373      option (google.api.http) = {
   374        get : "/v1alpha2/{name=planAssignments/*}"
   375        additional_bindings : <
   376          get : "/v1alpha2/{name=projects/*/planAssignments/*}"
   377        >
   378        additional_bindings : <
   379          get : "/v1alpha2/{name=organizations/*/planAssignments/*}"
   380        >
   381      };
   382    }
   383  
   384    // BatchGetPlanAssignments
   385    rpc BatchGetPlanAssignments(BatchGetPlanAssignmentsRequest)
   386        returns (BatchGetPlanAssignmentsResponse) {
   387      option (google.api.http) = {
   388        get : "/v1alpha2/planAssignments:batchGet"
   389      };
   390    }
   391  
   392    // ListPlanAssignments
   393    rpc ListPlanAssignments(ListPlanAssignmentsRequest)
   394        returns (ListPlanAssignmentsResponse) {
   395      option (google.api.http) = {
   396        get : "/v1alpha2/planAssignments"
   397        additional_bindings : <
   398          get : "/v1alpha2/{parent=projects/*}/planAssignments"
   399        >
   400        additional_bindings : <
   401          get : "/v1alpha2/{parent=organizations/*}/planAssignments"
   402        >
   403      };
   404    }
   405  
   406    // WatchPlanAssignment
   407    rpc WatchPlanAssignment(WatchPlanAssignmentRequest)
   408        returns (stream WatchPlanAssignmentResponse) {
   409      option (google.api.http) = {
   410        post : "/v1alpha2/{name=planAssignments/*}:watch"
   411        additional_bindings : <
   412          post : "/v1alpha2/{name=projects/*/planAssignments/*}:watch"
   413        >
   414        additional_bindings : <
   415          post : "/v1alpha2/{name=organizations/*/planAssignments/*}:watch"
   416        >
   417      };
   418    }
   419  
   420    // WatchPlanAssignments
   421    rpc WatchPlanAssignments(WatchPlanAssignmentsRequest)
   422        returns (stream WatchPlanAssignmentsResponse) {
   423      option (google.api.http) = {
   424        post : "/v1alpha2/planAssignments:watch"
   425        additional_bindings : <
   426          post : "/v1alpha2/{parent=projects/*}/planAssignments:watch"
   427        >
   428        additional_bindings : <
   429          post : "/v1alpha2/{parent=organizations/*}/planAssignments:watch"
   430        >
   431      };
   432    }
   433  
   434    // CreatePlanAssignment
   435    rpc CreatePlanAssignment(CreatePlanAssignmentRequest)
   436        returns (PlanAssignment) {
   437      option (google.api.http) = {
   438        post : "/v1alpha2/planAssignments"
   439        body : "plan_assignment"
   440        additional_bindings : <
   441          post : "/v1alpha2/{parent=projects/*}/planAssignments"
   442        >
   443        additional_bindings : <
   444          post : "/v1alpha2/{parent=organizations/*}/planAssignments"
   445        >
   446      };
   447    }
   448  
   449    // UpdatePlanAssignment
   450    rpc UpdatePlanAssignment(UpdatePlanAssignmentRequest)
   451        returns (PlanAssignment) {
   452      option (google.api.http) = {
   453        put : "/v1alpha2/{plan_assignment.name=planAssignments/*}"
   454        body : "plan_assignment"
   455        additional_bindings : <
   456          put : "/v1alpha2/{plan_assignment.name=projects/*/planAssignments/*}"
   457        >
   458        additional_bindings : <
   459          put : "/v1alpha2/{plan_assignment.name=organizations/*/planAssignments/"
   460                "*}"
   461        >
   462      };
   463    }
   464  
   465    // DeletePlanAssignment
   466    rpc DeletePlanAssignment(DeletePlanAssignmentRequest)
   467        returns (google.protobuf.Empty) {
   468      option (google.api.http) = {
   469        delete : "/v1alpha2/{name=planAssignments/*}"
   470        additional_bindings : <
   471          delete : "/v1alpha2/{name=projects/*/planAssignments/*}"
   472        >
   473        additional_bindings : <
   474          delete : "/v1alpha2/{name=organizations/*/planAssignments/*}"
   475        >
   476      };
   477    }
   478  
   479    // MigratePlanAssignment
   480    rpc MigratePlanAssignment(MigratePlanAssignmentRequest)
   481        returns (PlanAssignment) {
   482      option (google.api.http) = {
   483        put : "/v1alpha2/{plan_assignment.name=planAssignments/*}:migrate"
   484        body : "plan_assignment"
   485        additional_bindings : <
   486          put : "/v1alpha2/{plan_assignment.name=projects/*/planAssignments/"
   487                "*}:migrate"
   488        >
   489        additional_bindings : <
   490          put : "/v1alpha2/{plan_assignment.name=organizations/*/planAssignments/"
   491                "*}:migrate"
   492        >
   493      };
   494    }
   495  }